SQL Script to find all the triggers defined on a database or on a single table

SQL Triggers SQL Advanced SQL Tips

SQL Script to find triggers in SQL Database

Sometime we need to find all the triggers defined on the database. So in this case, we can use the below SQL Query:-SELECT
tbl.name as [Table Name]
, trig.name as [Trigger Name]
, trig.is_disabled
FROM [sys].[triggers] as trig
INNER JOIN sys.tables as tbl
ON trig.parent_id = tbl.object_idIn case, if we need to find out all the triggers defined on a particular table then we can use the below SQL script

SELECT
tbl.name as [Table Name]
, trig.name as [Trigger Name]
, trig.is_disabled
FROM [sys].[triggers] as trig
inner join sys.tables as tbl
on trig.parent_id = tbl.object_id
where tbl.name=’Tblname’

/*  where Tblname name is the name of the table*/

Related article


SQL Triggers – An Introduction

Keep learning and don’t forget to gives feedback on the article. You can also send feedback to me on my mailid  askvivekjohari@gmail.com

 

30 thoughts on “SQL Script to find all the triggers defined on a database or on a single table

  1. Pingback: Bedbugs
  2. Pingback: Mazlo
  3. Pingback: Scam
  4. Pingback: www.nagaqq1.site
  5. Pingback: Drogen
  6. Pingback: sahabat qq
  7. Pingback: Essential Oils
  8. Pingback: daftar sbobet888
  9. Pingback: w88 link
  10. Pingback: fun 88
  11. Pingback: keo truc tuyen
  12. Pingback: food
  13. Pingback: www.cialisis.org
  14. Pingback: qiuqiu99
  15. Pingback: duratrans nyc
  16. Pingback: Check This Out

Leave a Reply