如果scott的默认表空间为users,hr的默认表空间为test,hr对users没有权限,还是可以建scott.t1,因为是代建:
SQL> alter user hr default tablespace test;
SQL> alter user hr quota 0 on users;
SQL> grant create any table to hr;
SQL> revoke unlimited tablespace from hr;
conn hr/hr
SQL> create table t1 tablespace users as select * from all_objects ;
ORA-01536: 超出表空间 'USERS' 的空间限额
create table scott.testone as select * from all_objects; ----这是给scott建,t1是scott的表,只是代建,不是建hr的表,ok,可以建
CONN SYSTEM/SYSTEM
SQL> select * from dba_segments t where t.owner='HR' AND T.segment_name='TESTONE'; --空
select t.tablespace_name from dba_segments t where t.owner='SCOTT' AND T.segment_name='TESTONE';
TABLESPACE_NAME
------------------------------
USERS
--可建,建到users,是scott模式下