获取表:
select table_name from user_tables; // 当前用户的表
select table_name from all_tables; // 所有用户的表
select table_name from dba_tables; // 包括系统表
select table_name from dba_tables where owner='用户名'; // 当前用户的表
获取表字段:
select * from user_tab_columns where table_name='用户表名';
select * from all_tab_columns where table_name='用户表名';
select * from dba_tab_columns where table_name='用户表';
获取表注释:
select * from user_tab_comments;
select * from all_tab_comments;
select * from dba_tab_comments;
获取字段注释:
select * from user_col_comments;
select * from all_col_comments;
select * from dba_col_comments;
显示表结构:
SQL> desc tablename;