Linux 拨号vps windows公众号手机端

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

lewis 1年前 (2024-05-11) 阅读数 9 #VPS/云服务器
文章标签 SqlServer

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

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

版权声明

本文仅代表作者观点,不代表米安网络立场。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

热门