摘要:
SELECT Name,--存储过程名字 Definition --存储过程内容 FROM sys.sql_modules AS m INNER JOIN sys.all_objects AS o ON m.object_id = o.object_id WHERE o.[type] = 'P' 阅读全文
摘要:
SELECT Name,--视图名字 Definition --视图内容 FROM sys.sql_modules AS m INNER JOIN sys.all_objects AS o ON m.object_id = o.object_id WHERE o.[type] = 'v' 阅读全文
摘要:
SELECT 字段名=a.name, 类型=b.name, 字段说明=isnull(g.[value],''), 是否为空=case when a.isnullable=1 then 1 else 0 end, 是否自增=case when COLUMNPROPERTY(a.id,a.name,'IsIdentity')=1 then 1 else 0 end, 主键=case when exi... 阅读全文
摘要:
DECLARE DataClean CURSOR FOR SELECT a.name AS t_name , b.name AS c_name , c.DATA_TYPE FROM sys.tables a JOIN sys.columns b ON b.object_id = a.object_id... 阅读全文