var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Find columns which execute updatetriggers
I want to find the columns which execute updatetriggers. Is there in sqlserver a way to find out?
In Oracle you can say:
WHERE TRIGGER_OWNER = 'MyOwner'
AND TRIGGER_NAME = 'JobUpdate'
AND TABLE_NAME = 'Job'
AND COLUMN_LIST = 'YES'
I tried: EXEC sp_depends "dba.JobUpdate".
This says nothing about the updatecolumns.
Can anybody help?
thanx and greetz
Columns which execute update triggers?
Triggers are table-specific. Not column-specific.
If you want to find tables that have triggers on them you can search the schema or the system tables.
When you create a update trigger you can specify at the update of which column the trigger should go off. For example:
CREATE TRIGGER DBA.TestTrigger ON DBA.Test
FOR UPDATE AS
IF UPDATE(TestCol1) OR UPDATE(TestCol2)
Now I want to call a system-sp or do a select to get TestCol1 and TestCol2.
Is it clear now?
Since that is logical code within the trigger, I doubt that it is available in the system tables or schema, other than doing a text search for the name of the column or the key string "UPDATE(".