select *
from sysobjects o, syscomments s
where o.id = s.idandtextlike'%text%'and o.xtype = 'P'
text换成需要查的字段
数据库查询哪个对像里面包含表:
select o.namefromsys.all_sql_modules s,sysobjects o where definition like'%表名%'and o.id = s.object_id
select o.namefromsys.all_sql_modules s,sysobjects o where definition like'%表名%'and o.id = s.object_id