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

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

 

About vivekjohari

Database Consultant with more than 11.5 years of experience in database designing & programming and DBA related activities.  Had good experience on different databases like SQL Server, MySQL & Oracle, Azure SQL &  Big Data.
This entry was posted in SQL Advanced, SQL Tips, SQL Triggers and tagged , . Bookmark the permalink.

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

  1. Pingback: Bedbugs

  2. Pingback: dang ky tai khoan w88

  3. Pingback: How to watch Rugby World Cup 2019 live stream online instantly

  4. Pingback: türkiyenin amina koyim

  5. Pingback: Southwood Tallahassee

  6. Pingback: โกงชักดาบ

  7. Pingback: https://biznesblog.biz.pl/forum/marketing-f5/opinie-o-funkymedia-t64.html

  8. Pingback: Mazlo

  9. Pingback: https://surfwearhawaii.com

  10. Pingback: Shoarmazaak hengelo

  11. Pingback: Scam

  12. Pingback: www.nagaqq1.site

  13. Pingback: economic and industry analysis

  14. Pingback: Drogen

  15. Pingback: Dentist in Monroeville PA

  16. Pingback: https://funkymedia.pl/topical-authority.html

  17. Pingback: sahabat qq

  18. Pingback: Essential Oils

  19. Pingback: daftar sbobet888

  20. Pingback: www.fitnessncare.com

  21. Pingback: เว็บแทงบอล

  22. Pingback: w88 link

  23. Pingback: fun 88

  24. Pingback: keo truc tuyen

  25. Pingback: jungle selfie frame

  26. Pingback: food

  27. Pingback: www.cialisis.org

  28. Pingback: qiuqiu99

  29. Pingback: duratrans nyc

  30. Pingback: Check This Out

Leave a Reply