SQL查询SP代码

一种:EXEC sp_helptext 'xxx'

二种:
select b.text from sysobjects as a   
inner join syscomments as b   
on a.ID=b.ID where a.xtype='P' and name='xxx'
原文地址:https://www.cnblogs.com/Ammy/p/1684492.html