开发者

How could i get the content of a stored procedure using sql query

I need to get th开发者_如何学Goe content (statements) of a stored procedure on databaseA and in serverA,

I am using SQL Server


use databaseA
go
sp_helptext 'YourProcedure'
go


Select Routine_name, Routine_Definition
From Information_Schema.Routines
Where Routine_Name = "YourStoredProcedureName"


use DATABASE_NAME

select [name], [text]
from sysobjects SO join syscomments SC
on SO.id = SC.id
where xtype = 'P'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜