sqlserver添加修改字段注释
2019-06-16 本文已影响20人
夜希辰
1、sqlserver添加表解释
EXEC sys.sp_addextendedproperty @name = N'MS_Description',
@value = N'注释内容', @level0type = N'SCHEMA',
@level0name = N'dbo', @level1type = N'TABLE',
@level1name = N'表名'
go
- 举个例子
EXEC sys.sp_addextendedproperty @name = N'MS_Description',
@value = N'学生表', @level0type = N'SCHEMA',
@level0name = N'tmain', @level1type = N'TABLE',
@level1name = N'students'
go
2、sqlserver添加字段解释
EXEC sys.sp_addextendedproperty @name = N'MS_Description',
@value = N'注释内容', @level0type = N'SCHEMA',
@level0name = N'dbo', @level1type = N'TABLE',
@level1name = N'表名', @level2type = N'COLUMN',
@level2name = N'字段名'
- 举个例子
EXEC sys.sp_addextendedproperty @name = N'MS_Description',
@value = N'姓名', @level0type = N'SCHEMA',
@level0name = N'tmain', @level1type = N'TABLE',
@level1name = N'student', @level2type = N'COLUMN',
@level2name = N'sname'
3、sqlserver修改表注释
EXEC sys.sp_updateextendedproperty @name = N'MS_Description',
@value = N'注释内容', @level0type = N'SCHEMA',
@level0name = N'dbo', @level1type = N'TABLE',
@level1name = N'表名'
- 举个例子
EXEC sys.sp_updateextendedproperty @name = N'MS_Description',
@value = N'学生表', @level0type = N'SCHEMA',
@level0name = N'tmain', @level1type = N'TABLE',
@level1name = N'students'
go
4、sqlserver修改字段注释
EXEC sys.sp_updateextendedproperty @name = N'MS_Description',
@value = N'注释内容', @level0type = N'SCHEMA',
@level0name = N'dbo', @level1type = N'TABLE',
@level1name = N'表名', @level2type = N'COLUMN',
@level2name = N'字段名'
- 举个例子
EXEC sys.sp_updateextendedproperty @name = N'MS_Description',
@value = N'姓名', @level0type = N'SCHEMA',
@level0name = N'tmain', @level1type = N'TABLE',
@level1name = N'student', @level2type = N'COLUMN',
@level2name = N'sname'
2018年当我决定转行数据分析,我在简书认识凡人求索,第一次看见他文章的时候就在想如果我男朋友有这么优秀就好了………