Listing Defined SQL Server Triggers

I just spent way too much time debugging some SQL Server code, only to discover that my results did not match my SQL statements because of a trigger that I was unaware of. How did I find this trigger? With the help of a wonderful built in stored procedure named SP_HELPTRIGGER. The following lists all triggers associated with table myTable, along with the events they are associated with, and whether they are AFTER or INSTEAD OF:

3 responses to “Listing Defined SQL Server Triggers”

  1. Dave Cordes Avatar
    Dave Cordes

    This is the main reason I don’t even like to use them. When you hit a snag you totally forget you set it up in the first place. However, they do have a place in the scheme of things and can be valuable in some cases. Like you said in another blog entry, use the database for what it was designed for.

  2. Doug Avatar

    Do you have any suggestions on a book about SQL Server for someone needing to change over from Access to SQL Server?
    (note SQL Server is the only option besides Access offered by my IT department)

  3. Ben Forta Avatar
    Ben Forta

    Doug, this one is a bit dated (it was written for SQL Server 2000), but you might want to try ‘Microsoft Access Developer’s Guide To SQL Server’.
    — Ben

Leave a Reply