title: What is the most portable way to check whether a trigger exists in SQL Server?
body: <p>I'm looking for the <strong>most portable</strong> method to check for existence of a trigger in MS SQL Server. It needs to work on at least SQL Server 2000, 2005 and preferably 2008.</p>
  
  <p>The information does not appear to be in INFORMATION_SCHEMA, but if it is in there somewhere, I would prefer to use it from there.</p>
  
  <p>I do know of this method:</p>
  
  <pre><code>if exists (
      select * from dbo.sysobjects 
      where name = 'MyTrigger' 
      and OBJECTPROPERTY(id, 'IsTrigger') = 1
  ) 
  begin
  
  end
  </code></pre>
  
  <p>But I'm not sure whether it works on all SQL Server versions.</p>