SqlServer教程

SQL server management 查询所有触发器

本文主要是介绍SQL server management 查询所有触发器,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!


SELECT OBJECT_NAME(a.parent_obj) AS [表名] ,
a.name AS [触发器名称] ,
( CASE WHEN b.is_disabled = 0 THEN '启用'
ELSE '禁用'
END ) AS [状态] ,
b.create_date AS [创建日期] ,
b.modify_date AS [修改日期] ,
c.text AS [触发器语句]
FROM sysobjects a
INNER JOIN sys.triggers b ON b.object_id = a.id
INNER JOIN syscomments c ON c.id = a.id
WHERE a.xtype = 'tr'
ORDER BY [表名]

 

执行结果:

 

这篇关于SQL server management 查询所有触发器的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!