sqltriggerssybaseadvantage-database-server

How do you identify the triggers associated with a table in a sybase database?


I am using SQL Advantage and need to know what the SQL is to identify the triggers associated with a table. I don't have the option to use another tool so the good old fashioned SQL solution is the ideal answer.


Solution

  • I also found out that

    sp_depends <object_name> 
    

    will show you a lot of information about a table, including all triggers associated with it. Using that, along with Ray's query can make it much easier to find the triggers. Combined with this query from Ray's linked article:

    sp_helptext <trigger_name>
    

    and you can see the definition of the trigger:

    sp_depends <trigger_name>
    

    will also show you all tables related to a trigger