如何用SQL语句检查一个触发器存在于哪个表中?

现在只知道触发器的名字,却不知道存在于哪个表中?
---------------------------------------------------------------

select b.name from sysobjects a,sysobjects b
where b.id=a.deltrig
and a.type='tr' and a.name='trigername'

---------------------------------------------------------------

select object_name(parent_obj) from sysobjects where name='yourTriggerName' and type='TR'
---------------------------------------------------------------

select b.name from sysobjects a join sysobjects b on b.id=a.parent_obj
where a.type='tr' and a.name='trigername'

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus