1

Instead of something like

SELECT * FROM sys.triggers WHERE CONTAINS(Name, 'Update');

I would like to do something like

SELECT * FROM sys.triggers WHERE ("TRIGGER IS FOR UPDATE")

Is there a way to do that?

TTT
  • 1,848
  • 2
  • 30
  • 60
  • Possible duplicate of [Need to list all triggers in SQL Server database with table name and table's schema](https://stackoverflow.com/questions/4305691/need-to-list-all-triggers-in-sql-server-database-with-table-name-and-tables-sch) – Roman Marusyk Oct 24 '17 at 13:33

2 Answers2

2

Use

SELECT * FROM sys.triggers WHERE OBJECTPROPERTY(object_id, 'ExecIsUpdateTrigger') = 1
Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116
0

You need to look into SysObjects and SysComments, below query should work:

select * from 
sysobjects, syscomments
WHERE sysobjects.id = syscomments.id and type='tr'
and text like '%AFTER UPDATE%'
Vineet
  • 21
  • 4