sql 表注释
创建表
create table testTable (
id varchar(200) primary key not null,
testRecord varchar(200),
)
为字段添加注释
格式如右:execute sp_addextendedproperty 'MS_Description','字段备注信息','user','dbo','table','字段所属的表名','column','添加注释的字段名';
execute sp_addextendedproperty 'MS_Description','添加的注释内容','user','dbo','table','testTable','column','testRecord';
修改字段注释
execute sp_updateextendedproperty 'MS_Description',
'修改的注释内容','user','dbo','table','testTable','column','testRecord';
删除字段注释
execute sp_dropextendedproperty 'MS_Description','user','dbo','table','testTable','column','testRecord';
添加表注释
execute sp_addextendedproperty 'MS_Description','注释-些表为测试表','user','dbo','table','testTable',null,null;
修改表注释
execute sp_updateextendedproperty 'MS_Description','修改注释-测试表','user','dbo','table','testTable',null,null;
删除表注释
execute sp_dropextendedproperty 'MS_Description','user','dbo','table','testTable',null,null;
————————————————
版权声明:本文为CSDN博主「山___」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/huapenguag/article/details/80471309