新增带备注字段
Sqlserver新增带备注字段
ALTER TABLE QRCode ADD Param_ArticleID INT NOT NULL DEFAULT (0);
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'二维码业务参数(Content文章ID)' , @level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'TABLE',@level1name=N'QRCode', @level2type=N'COLUMN',@level2name=N'Param_ArticleID'
GO
修改备注
exec sp_updateextendedproperty N'MS_Description', N'字段备注内容', N'SCHEMA', N'dbo',N'table', N'表名',N'column', N'字段名';
表备注
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'AAA信息表' ,
@level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'aaa'
GO