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

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

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

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

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

上一篇:MySQL取得当前时间的函数是什么 格式化日期的函数是什么


下一篇:Mysql的常用数据类型以及用途总结