SELECT ‘comment on column ‘|| t.table_name||’.’||t.colUMN_NAME||’ is ’ || ‘’‘’ ||
(CASE WHEN T1.COMMENTS IS NULL THEN (SELECT T2.COMMENTS FROM User_Col_Comments T2 WHERE T1.colUMN_NAME=T2.colUMN_NAME AND T2.COMMENTS IS NOT NULL and rownum=1) ELSE NULL END) ||‘’‘’|| ‘;’
FROM User_Tab_Cols t, User_Col_Comments t1
WHERE t.table_name = t1.table_name
AND t.column_name = t1.column_name(+) and t1.comments is null
AND t.table_name in (SELECT table_name FROM User_Col_Comments where table_name like ‘TB%’ and comments is null
)文章来源地址https://www.toymoban.com/news/detail-692394.html
文章来源:https://www.toymoban.com/news/detail-692394.html
到了这里,关于oracle批量导出字段注释,并且相同字段注释为空的情况取有数据的第一行赋值的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!