I\'m looking for the most portable method to check for existence of a trigger in MS SQL Server. It needs to work on at least SQL Server 2000, 2005 and prefe
Tested and doesn't work on SQL Server 2000:
select * from sys.triggers where name = 'MyTrigger'
Tested and works ok on SQL Server 2000 and SQL Server 2005:
select * from dbo.sysobjects where name = 'MyTrigger' and OBJECTPROPERTY(id, 'IsTrigger')