标签:
SELECT ‘EXEC sys.sp_addextendedproperty @name=N‘||chr(39) ||‘MS_Description‘||chr(39) ||‘, @value=N‘||chr(39)||COMMENTS||chr(39)||‘, @level0type=N‘||chr(39)||‘SCHEMA‘||chr(39)||‘,@level0name=N‘||chr(39)||‘dbo‘||chr(39)||‘, @level1type=N‘||chr(39)||‘TABLE‘||chr(39)||‘,@level1name=N‘||chr(39)||TABLE_NAME||chr(39)||‘, @level2type=N‘||chr(39)||‘COLUMN‘||chr(39)||‘,@level2name=N‘||chr(39)||‘VALID_DATE‘||chr(39)
FROM USER_COL_COMMENTS WHERE TABLE_NAME = ‘表名称‘
***注意:Oracle中注释为空的要排除在外,否则NULL会被替换成‘ ‘
标签:
原文地址:http://www.cnblogs.com/stray-dog/p/4290442.html