Code Simplified – Viral Sarvaiya

Code Simplified – Viral Sarvaiya, Web Developer Friends, dot net Developer, Sql Server Developer

Ways to check whether a trigger exists in SQL Server

Posted by Viral Sarvaiya on December 13, 2011


How to find there are trigger is exists in database or not?

there are 2 ways to find the list of the trigger in database

select * from dbo.sysobjects
where OBJECTPROPERTY(id, 'IsTrigger') = 1


select * from sys.triggers

and if you want to find trigger from particular table,

exec sp_helptrigger 'TableName'


select * from sys.triggers where name = 'TableName'




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: