Find Which Tables Have Triggers in SQL Server 2005/ 2008

If you want to quickly list down the tables having triggers in your database, here's how to do so:


USE [YourDB]


SELECT


OBJECT_NAME(parent_id) AS TableName,


name AS TriggerName,


create_date AS CreationDate,


modify_date AS ModifyDate


FROM sys.triggers




I ran the query on the PUBS database and got the following results:


TableName TriggerName      CreationDate              ModifyDate


employee  employee_insupd 2009-01-23 14:16:35.680 2009-01-23 14:16:35.680


2 comments: