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

Oracle导出当前用户下所有表的表注释,字段 字段注释

2014-07-17 15:34 330 查看
select distinct TABLE_COLUMN.*,

TABLE_NALLABLE.DATA_TYPE,

TABLE_NALLABLE.NULLABLE

from (select distinct utc.table_name table_name,

utc.comments table_comments,

ucc.column_name column_name,

ucc.comments column_comments

from user_tab_comments utc, user_col_comments ucc

where utc.table_name = ucc.table_name

and utc.table_name not like '%_B'

and utc.table_name not like '%_Z'

and utc.table_name not like '%1%') TABLE_COLUMN,

(select distinct table_name, column_name, nullable, DATA_TYPE

from user_tab_cols

where table_name not like '%_B'

and table_name not like '%_Z'

and table_name not like '%1%') TABLE_NALLABLE

where TABLE_COLUMN.column_name = TABLE_NALLABLE.column_name

and TABLE_COLUMN.TABLE_NAME = TABLE_NALLABLE.table_name;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐