批量获取oracle的表和表字段注释
--用户表注释表
SELECT * FROM USER_TAB_COMMENTS WHERE TABLE_NAME LIKE 'WEB_ISC_%'; --显示指定表的注释
SELECT 'comment on table ' || T.TABLE_NAME || ' is ''' || T.COMMENTS || ''''
FROM USER_TAB_COMMENTS T
WHERE T.TABLE_NAME LIKE 'WEB_ISC_%'; --用户字段注释表
SELECT * FROM USER_COL_COMMENTS WHERE TABLE_NAME LIKE 'WEB_ISC_%'; --显示指定表的字段注释
SELECT 'comment on column ' || T.TABLE_NAME || '.' || T.COLUMN_NAME ||
' is ''' || T.COMMENTS || ''''
FROM USER_COL_COMMENTS T
WHERE T.TABLE_NAME LIKE 'WEB_ISC_%';