--增加欄位的COMMENT
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'COMMENT' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TABLE_NAME', @level2type=N'COLUMN',@level2name=N'COLUMN_NAME'
--看TABLE的COMMENT
SELECT * FROM ::fn_listextendedproperty(NULL, 'user', 'dbo', 'table', 'TABLE_NAME',NULL,NULL)
--看欄位的COMMENT
SELECT * FROM ::fn_listextendedproperty(NULL, 'user', 'dbo', 'table', 'TABLE_NAME', 'column', DEFAULT)
沒有留言:
張貼留言