查询当前用户所有表、视图、字段的注释

【1】导出、生成当前用户的所有表和视图的注释
select 'comment on table '||a.table_name|| ' is '||''''||a.comments||''''||';' from user_tab_comments a where a.table_type in('TABLE','VIEW');
【2】导出、生成当前用户的所有表字段的注释
select 'comment on column '||t.table_name||'.'||t.column_name||' is '||''''||t.comments||''''||';' from user_col_comments t

posted @ 2019-12-16 10:54  sinchuan  阅读(505)  评论(0)    收藏  举报