34,587
社区成员
发帖
与我相关
我的任务
分享
select b.text as sql from sysobjects a,syscomments b where a.xtype ='P' and a.id = b.id
select object_name(id) spname,text from sys.syscomments where id=OBJECT_ID('sp_test')
也可以用这个语句(2005以上)。SELECT text FROM syscomments s WHERE id=object_id('Pname')
sp_helptext procname