sqlserver修改表结构字段怎么加注释

avatar
作者
筋斗云
阅读量:0

在SQL Server中,可以使用以下语法来为表结构字段添加注释:

EXEC sys.sp_addextendedproperty      @name = N'MS_Description',      @value = N'Your comment here',     @level0type = N'Schema',      @level0name = 'dbo',      @level1type = N'Table',      @level1name = 'YourTableName',      @level2type = N'Column',      @level2name = 'YourColumnName'; 

请将上面的语法中的以下部分替换为实际的值:

  • Your comment here:要添加的注释内容
  • YourTableName:表名
  • YourColumnName:字段名

执行上面的语法后,即可为指定的表结构字段添加注释。

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!