怎样在触发器脚本中得到该触发器的父对象?

怎样在触发器脚本中得到该触发器的父对象?

就是得到触发器所在的表名
---------------------------------------------------------------

Exec sp_depends 'Trigger名字'
---------------------------------------------------------------

select object_name(parent_obj) from sysobjects
where xtype = 'TR' and name = 'Trigger名字'

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