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
)
12-21
2238
2238
08-18
7030
7030
06-02
2367
2367

被折叠的 条评论
为什么被折叠?



