如题。
------解决方案--------------------
- SQL code
--查询所有存储过程select Pr_Name as [存储过程], [参数]=stuff((select ','+[Parameter] from ( select Pr.Name as Pr_Name,parameter.name +' ' +Type.Name + ' ('+convert(varchar(32),parameter.max_length)+')' as Parameter from sys.procedures Pr left join sys.parameters parameter on Pr.object_id = parameter.object_id inner join sys.types Type on parameter.system_type_id = Type.system_type_id where type = 'P' ) t where Pr_Name=tb.Pr_Name for xml path('')), 1, 1, '')from ( select Pr.Name as Pr_Name,parameter.name +' ' +Type.Name + ' ('+convert(varchar(32),parameter.max_length)+')' as Parameter from sys.procedures Pr left join sys.parameters parameter on Pr.object_id = parameter.object_id inner join sys.types Type on parameter.system_type_id = Type.system_type_id where type = 'P' )tbwhere Pr_Name not like 'sp_%' --and Pr_Name not like 'dt%'group by Pr_Nameorder by Pr_Name
------解决方案--------------------
- SQL code
SELECT name AS 名称, b.encrypted AS 是否加密FROM sysobjects a LEFT JOIN syscomments b ON a.id = b.idWHERE a.xtype = 'P'