转载自:http://blog.itpub.net/29485627/viewspace-1246317/

 

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. 

相关文章:

  • 2022-01-12
  • 2022-12-23
  • 2021-08-17
  • 2021-11-29
猜你喜欢
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
相关资源
相似解决方案