您的位置:首页 > 数据库 > Oracle

oracle 查看建表语句

2016-01-04 16:00 441 查看

oracle 查看建表语句

获取表:

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=’用户名’

user_tables:

dba_tables:

all_tables:

all_objects:

获取表字段:

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

–相应的还有dba_tab_comments,all_tab_comments,这两个比user_tab_comments多了ower列。

获取字段注释:

select * from user_col_comments
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: