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'