日期:2014-05-17  浏览次数:20465 次

sp_addextendedproperty 插入描述的问题,非常急!!!
我在PowerDesigner里有很多描述插入语句,想要插入到数据库中执行,数据量有些大200多个表。我想拼成一个脚本。但数据库表中有的有描述,我想让sql语句当表中有描述的时候,就不插入,没有描述信息的时候才执行语句。怎么解决!!急!!!!在线等!
execute sp_addextendedproperty 'MS_Description', 
   '详细表',
   'user', 'dbo', 'table', 'Authorize_apply_detail'
go

execute sp_addextendedproperty 'MS_Description', 
   '主表id',
   'user', 'dbo', 'table', 'Authorize_apply_detail', 'column', 'id'
go
......
if exists ...类似的。

------解决方案--------------------
SELECT class, class_desc, major_id, minor_id, name, value
FROM sys.extended_properties;
GO