数据库对象中查找某一关键字
select
a.
text
,b.name,b.xtype
from
dbo.syscomments a,dbo.sysobjects b
where a.id = b.id and PATINDEX ( ' %tb_blackname% ' , a. text ) > 0 order by xtype
where a.id = b.id and PATINDEX ( ' %tb_blackname% ' , a. text ) > 0 order by xtype