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 查询所有触发器

 

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/278681.html

(0)
上一篇 2022年8月3日
下一篇 2022年8月3日

相关推荐

发表回复

登录后才能评论