当一个表建立时,谁是它的所有者?

解决方案 »

  1.   

    一般正常的是当前登陆的用户...当然前提是 你没有在 要创建的表前面 + 其他用户名..
    比如 create table scott.test...想要看创建的表 拥有者是谁..可以通过视图来查询
    select owner from dba_tables where table_name='表名';
      

  2.   

    当前用户是表的所有者。
    可以用sys或system登陆查询表的所有者:select owner from dba_tables where table_name='表名';
      

  3.   

    使用哪个用户建的表,所有者就是谁。
    但有一特例,就是创建时,表名前有限定名,例create table scott.表名...,而当前用户是HR
    此时的所有者为scott(这是需要HR用户具有在scott方案中创建表的权限的,否则不能进行)查看表的所有者:
    1. 使用sys登录
       c:\sqlplus sys/sys@数据库SID as sysdba
    2. 执行查询
       sql>select owner from dba_tables where table_name = upper(表名); (方式1)
       sql>select owner from all_tables where table_name = upper(表名); (方式2)