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
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
Pingback: Bedbugs
Pingback: dang ky tai khoan w88
Pingback: How to watch Rugby World Cup 2019 live stream online instantly
Pingback: türkiyenin amina koyim
Pingback: Southwood Tallahassee
Pingback: โกงชักดาบ
Pingback: https://biznesblog.biz.pl/forum/marketing-f5/opinie-o-funkymedia-t64.html
Pingback: Mazlo
Pingback: https://surfwearhawaii.com
Pingback: Shoarmazaak hengelo
Pingback: Scam
Pingback: www.nagaqq1.site
Pingback: economic and industry analysis
Pingback: Drogen
Pingback: Dentist in Monroeville PA
Pingback: https://funkymedia.pl/topical-authority.html
Pingback: sahabat qq
Pingback: Essential Oils
Pingback: daftar sbobet888
Pingback: www.fitnessncare.com
Pingback: เว็บแทงบอล
Pingback: w88 link
Pingback: fun 88
Pingback: keo truc tuyen
Pingback: jungle selfie frame
Pingback: food
Pingback: www.cialisis.org
Pingback: qiuqiu99
Pingback: duratrans nyc
Pingback: Check This Out