时间:2021-07-01 10:21:17 帮助过:2人阅读
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘注释‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘表名‘, ‘
2、给字段添加注释
EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘注释‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘表名‘, @level2type=N‘COLUMN‘,@level2name=N‘字段名‘;
3、查看注释信息
-- 查看当前数据库中的table select a.object_id,a.* from sys.tables a where name = ‘user‘; -- 查看表的字段信息 select * from sys.columns a where a.object_id = 293576084; -- 扩展属性表,当class 为1对象列 2参数 7索引 是major为object_id,minor为字段id select * from sys.extended_properties a where a.major_id =293576084;
【Sqlserver】字段编辑
标签:doc href HERE where 删除 sch xtend 过程 exe