var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: which table does a trigger belong to?
Is there any way to determine which table a trigger belongs to by querying only the system tables?
I was hoping for something like a parent_id column in sysobjects, but there is no such column.
I am using ASE 15.0
According to my understanding(Correct me if i am wrong), we don't have system table for triggers specifically ,to identify which table it belong to.
But We have another way to find it out using the sysobjects table.
In sysobjects table there is a field 'deltrig' which will tell us the id of the table to which the trigger belong to.
Try this query...
select name from sysobjects where id = (select deltrig from sysobjects where type='TR' and name = 'TRI_INSERT'(trigger name))
I hope this will help You.
yes, that helps a lot!
however I've got a follow up: does this mean you can only have a maximum of one trigger of each type in sybase? that is, one insert trigger, one delete, one update?
In SQL Server and other RDBMS you can have more. but with this design of sysobjects, it's unclear how you would represent more than one of a given type on a table.
sybase have some restrictions on triggers. u can have only maximum of three triggers for a table. refer the below link
Check in chapter 16. Rules Associated with triggers