当前位置: 代码迷 >> Sql Server >> 怎么查找:哪些存储过程中包含字段(或字符)
  详细解决方案

怎么查找:哪些存储过程中包含字段(或字符)

热度:12   发布时间:2016-04-27 13:17:22.0
如何查找:哪些存储过程中包含字段(或字符)?
数据库里写了很多存储过程,想用SQL语句查出哪些存储过程包含字段(如:user_id)

------解决方案--------------------
[code=SQLl]
select * from sys.objects s where s.type='p' and s.name like '%user_id%'

[/code]
------解决方案--------------------
[code=SQ]Lselect name from sysobjects where id in (select id from syscomments where text like '%user_id%')[/code]
------解决方案--------------------
我用的方法是tasks里把所有存储过程保存出来,然后用nodpad++打开搜索。。。
  相关解决方案