1
2
3
4
5
|
select *
from sysobjects o, syscomments s
where o.id = s.id
and text like '%text%'
and o.xtype = 'P'
|
text换成需要查的字段
数据库查询哪个对象里面包含表
1
|
select o. name from sys.all_sql_modules s,sysobjects o where definition like '%表名%' and o.id = s.object_id
|
表名换成需要查的表名
原文链接:https://www.cnblogs.com/chenqingbin/p/11320144.html