转载自:http://blog.itpub.net/29485627/viewspace-1246317/
Oracle查询当前用户和当前用户下的所有表
(1)查询当前用户
SQL> show user
USER is "SCOTT"
(2)查询当前用户下的所有表,有三种方法
第一种:
SQL> select table_name from tabs;
TABLE_NAME
--------------------------------------------------------------------------------
DEPT
EMP
BONUS
SALGRADE
WORKERSALARY
WS
6 rows selected.
第二种:
SQL> select table_name from user_tables;
TABLE_NAME
--------------------------------------------------------------------------------
DEPT
EMP
BONUS
SALGRADE
WORKERSALARY
WS
6 rows selected.
第三种:
SQL> select tname from tab;
TNAME
--------------------------------------------------------------------------------
DEPT
EMP
BONUS
SALGRADE
WORKERSALARY
WS
6 rows selected.