SQL SERVER添加表註釋、字段註釋

--爲字段添加註釋 --Eg. execute sp_addextendedproperty 'MS_Description','字段備註信息','user','dbo','table','字段所屬的表名','column','添加註釋的字段名'; execute sp_addextendedproperty 'MS_Description','add by liyc. 診斷類別碼','user','dbo','table','DiagRecord','column','DiagTypeCode'; --修改字段註釋 execute sp_updateextendedproperty 'MS_Description','add by liyc.','user','dbo','table','DiagRecord','column','DiagTypeCode'; --刪除字段註釋 execute sp_dropextendedproperty 'MS_Description','user','dbo','table','DiagRecord','column','DiagTypeCode'; -- 添加表註釋 execute sp_addextendedproperty 'MS_Description','診斷記錄文件','user','dbo','table','DiagRecord',null,null; -- 修改表註釋 execute sp_updateextendedproperty 'MS_Description','診斷記錄文件1','user','dbo','table','DiagRecord',null,null; -- 刪除表註釋 execute sp_dropextendedproperty 'MS_Description','user','dbo','table','DiagRecord',null,null;原文:https://www.cnblogs.com/xingyadian/p/10030793.html
相關文章
相關標籤/搜索