Sometimes you need to drop a trigger, and depending on your SCM, your database might not actually have it.
Many people start blinding querying the system tables for this (a few of those examples are revealed by this Google search query).
This might be caused by old Microsoft documentation showing this as an example back in SQL Server 2000.
This is not needed for DML triggers (that react on data changes), querying the system tables is only needed for DDL triggers (that react on DDL actions).
For DML triggers (the vast majority!), you can use OBJECT_ID in stead. Read the rest of this entry »





