Need to list all triggers in SQL Server database with table name and table's schema

后端 未结 19 934
再見小時候
再見小時候 2020-11-28 17:12

I need to list all triggers in SQL Server database with table name and table\'s schema.

I\'m almost there with this:

SELECT trigger_name = name, trig         


        
19条回答
  •  渐次进展
    2020-11-28 18:09

    And what do you think about this: Very short and neat :)

    SELECT OBJECT_NAME(parent_id) Table_or_ViewNM,
          name TriggerNM,
          is_instead_of_trigger,
          is_disabled
    FROM sys.triggers
    WHERE parent_class_desc = 'OBJECT_OR_COLUMN'
    ORDER BY OBJECT_NAME(parent_id),
    Name ;
    

提交回复
热议问题