关于存储过程的几个sql
获取系统最近更新存储过程名
select name,object_id,create_date,modify_date
from sys.objects where type = 'P '
order by modify_date desc
获取系统所有存储过程内容
select b.name ,a.text from syscomments a,sysobjects b where object_id(b.name)=a.id and b.xtype in('P','TR')
检索所有存储过程内容
select b.name ,a.text ,b.crdate,b.refdate from syscomments a,sysobjects b
where
charindex('letao_statistics',a.text)>0 and
object_id(b.name)=a.id and b.xtype in('P','TR') order by b.refdate desc