快速查找sql server中的存储过程和视图

select a.name,a.[type],b.[definition] from sys.all_objects a,sys.sql_modules b 
where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in ('P','V','AF') where a.name='Storage Name or View Name '
order by a.[name] asc

如果找存储过程

sp_helptext 'spName'

  

 

posted @ 2016-10-10 09:57  ~扎克伯格  阅读(368)  评论(0编辑  收藏  举报