SQL存储过程名取得存储过程内容
本语句适用于MS SQL SERVER 2000/2005:
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO -- GetContentByProcedureName '[dbo].[存储过程名]' Create procedure GetContentByProcedureName (@ProcedureName nvarchar(500)) as if exists (select * from dbo.syscomments where id=object_id(N''+@ProcedureName+'')) select c.text, c.encrypted, c.number, xtype=convert(nchar(2), o.xtype), datalength(c.text), convert(varbinary(8000), c.text), 0 from dbo.syscomments c, dbo.sysobjects o where o.id = c.id and c.id = object_id(N''+@ProcedureName+'') order by c.number, c.colid option(robust plan) GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦