SQL SERVER 查询数据库中所有的触发器

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' 
--AND c.text LIKE '%RecoupTimeRange%'
ORDER BY [表名]

  

上一篇:Thinkphp6框架学习:有关数据库的基本操作


下一篇:Asp.net MVC 4 异步方法