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

   2024-10-13 8920
核心提示:在SQL Server中,可以使用以下语法来为表结构字段添加注释:EXEC sys.sp_addextendedproperty @name = N'MS_Description&#x

在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:字段名

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

 
举报打赏
 
更多>同类维修大全
推荐图文
推荐维修大全
点击排行

网站首页  |  关于我们  |  联系方式网站留言    |  赣ICP备2021007278号