SQL SERVER 查看所有触发器

时间:2021-03-05 13:01:52   收藏:0   阅读:0

https://www.cnblogs.com/guorongtao/p/13329618.html

 

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
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!