SETQUOTED_IDENTIFIERON GO SETANSI_NULLSON GO --GetContentByProcedureName'[dbo].[存储过程名]' CreateprocedureGetContentByProcedureName
(@ProcedureNamenvarchar(500)) as ifexists(select*fromdbo.syscommentswhereid=object_id(N''+@ProcedureName+'')) selectc.text,c.encrypted,c.number,xtype=convert(nchar(2),o.xtype), datalength(c.text),convert(varbinary(8000),c.text),0fromdbo.syscommentsc,dbo.sysobjectso whereo.id=c.idandc.id=object_id(N''+@ProcedureName+'') orderbyc.number,c.colidoption(robustplan) GO SETQUOTED_IDENTIFIEROFF GO SETANSI_NULLSON GO