Builder http://builder.com.com Presents your SQL SERVER E-NEWSLETTER for April 15, 2003 <-------------------------------------------> USE SP_HELPTRIGGER TO LEARN MORE ABOUT TRIGGERS ON YOUR TABLES The stored procedure sp_helptrigger can help you learn more about what triggers are on your tables. Here is the syntax: sp_helptrigger [@tabname =] 'table' [, @triggertype =] 'type'] The sp_helptrigger procedure requires only the table name argument and lets you explore specific types of triggers. It will return the trigger name, the trigger owner, and values reflecting whether the trigger is an isupdate, isdelete, isinsert, isafter, or isinsteadof trigger. The query returns 1 if the query is true and 0 if it's not. In the following example, we'll put a trigger on the sales table in the pubs database; this trigger will raise an error message if a user tries to insert or update the table when the amount of books sold is 10: USE pubs CREATE TRIGGER saleswarn ON sales FOR INSERT, UPDATE AS RAISERROR (50010, 16, 10) We can use sp_helptrigger to get information about the trigger we just created: USE pubs EXEC sp_helptrigger sales The example returns the following: Trigger_name trigger_owner isupdate isdelete isinsert isafter isinsteadof Saleswarn dbo 1 0 1 1 0 ----------------------------------------