MS-SQL - List trigger in your db.
Trigger is special set of SQL code where activation is caused by modifications to the tables. (by an INSERT,DELETE or UPDATE).
Trigger is associated with database table, so if you want to find it from your SQL Enterprise Manager or your SQL Query Analyzer, you need to go table by table to find where the trigger is. [see below picture]

If you don’t want to find it that way, no worries. There is easy way how to find it. Just use simple query and all your triggers associated to which table will be list down.
select B.Name as TableName,A.name as TriggerName from sysobjects A,sysobjects B where A.xtype='TR' AND A.parent_obj = B.id
You will get a result like below.

There are a lot of thing that you can play around with sysobjects in MS-SQL.
Here are the list of all possible values for this column (xtype):
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L = Log
P = Stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication filter stored procedure
S = System table
TR = Trigger
U = User table
UQ = UNIQUE constraint (type is K)
V = View
X = Extended stored procedure
Till then….adios.
If you're new here, you may want to subscribe to my RSS feed or get my latest post directly in your mailbox. Thanks for visiting !
![[Ask]](http://www.arejae.com/blog/wp-content/plugins/bookmarkify/ask.png)
![[Bloglines]](http://www.arejae.com/blog/wp-content/plugins/bookmarkify/bloglines.png)
![[del.icio.us]](http://www.arejae.com/blog/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.arejae.com/blog/wp-content/plugins/bookmarkify/digg.png)
![[Furl]](http://www.arejae.com/blog/wp-content/plugins/bookmarkify/furl.png)
![[StumbleUpon]](http://www.arejae.com/blog/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://www.arejae.com/blog/wp-content/plugins/bookmarkify/technorati.png)

