Sql Server 查看所有存储过程或视图的位置及内容

时间:2014-06-15 20:39:31   收藏:0   阅读:195

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)
order by a.[name] asc

通过这个sql语句可以查到sql server中的视图和存储过程的内容及位置,然后再用where过滤得到,你想要的结果

Sql Server 查看所有存储过程或视图的位置及内容,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!