List tables that have trigger

1

Is there any way to know which tables have at least 1 trigger?

For example, I have a system with 10,000 tables, and I would like to know which one has a trigger.

    
asked by anonymous 23.04.2018 / 20:10

1 answer

2

I found this answer in a SOEN question, I believe it will solve you:

SELECT t.name AS TableName, tr.name AS TriggerName  
FROM sys.triggers tr
INNER JOIN sys.tables t ON t.object_id = tr.parent_id

I understand that tables and related triggers will be listed; in the response the table is added as a filter, I removed it so that all are listed;

    
23.04.2018 / 20:28