本例中我的登錄用戶是TEST,tablespace是TESTSPACE
1)查詢當前用戶表空間
select default_tablespace from dba_users where username='TEST';
2)查詢所有表空間
語句一:select * from dba_tablespaces;
語句二:select * from v$tablespace;
3)查詢用戶下所有表
語句一: select * from user_tables;
語句二: select * from dba_tables where owner='TEST';
4)查詢表空間下的用戶
select distinct s.owner from dba_segments s where s.tablespace_name ='TESTSPACE';