sql server 给表加说明,给列/字段加说明

--sql server给表加说明:
--banner 
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Banner' ,
 @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Banner'
--News 资讯
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'资讯' ,
 @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'News'
--列名加说明:

--banner [Id]:Id主键
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id主键' ,
@level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Banner',
@level2type=N'COLUMN',@level2name=N'Id'

 

posted @ 2018-05-15 15:15  紫晶城  阅读(597)  评论(0编辑  收藏  举报