单表操作方法:
select   'exec   sp_addextendedproperty   N''MS_Description'',   N'''+cast(value   as   varchar)+''',N''user'',   N''dbo'',   N''table'',   N'''+object_name(b.id)+''',N''column'',   N'''+a.name+''''    
  from   syscolumns   a   inner   join   sysproperties   b   on   a.id=b.id   and   a.colid=b.smallid     and   object_name(b.id)='表名
多表操作方法:
select   'exec   sp_addextendedproperty   N''MS_Description'',   N'''+cast(value   as   varchar)+''',N''user'',   N''dbo'',   N''table'',   N'''+object_name(b.id)+''',N''column'',   N'''+a.name+''''    
  from   syscolumns   a   inner   join   sysproperties   b   on   a.id=b.id   and   a.colid=b.smallid  
执行以上语句将结果拷到SQL查询分析器中执行就将说明附加上来了。

相关文章:

  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-16
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
相关资源
相似解决方案