Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Find out all Triggers on a table or DB

Author  Topic 

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-03-13 : 11:53:03
Is there a SQL to find out what are all the triggers that exist on a particular table or in the database as a whole?

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-13 : 12:03:36
--USE DBNAME
Select * from sys.triggers
--to get for a particular table:
where parent_id =

(Select object_id from sys.tables
where name =[TableName])

--or else do a join to show tablename instead of parent_id
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-13 : 13:45:13
EXEC sp_helptrigger 'yourtable'
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-03-13 : 15:08:02
Thanks Guys for the info.
Go to Top of Page
   

- Advertisement -