-
RI Vs Triggers
Hi,
Please tell me the execution order, if i have a referential integrity and insert trigger on a table. I am experiencing change in execution order with sql server 6.5 service pack 3 and service pack 5a
For Ex :
I have a
table x
(col1 int pk,
col2 int,
col3 int,
constraint foreign_key fk_col3(col3) references table y);
and
there is a "insert trigger on table x - if col3 is invalid it updates to null"
I have a procedure to insert data to table x with input parameters col1,col2,col3.
Now if i pass col3 an invalid value. What is the order of execution. Will the referential integrity constraint stop the trigger from firing.
I had tested the above case with SQL server 6.5 with service pack 3 (6.50.258), it used to fire insert trigger on table x which used to update col3 value to null and in effect i never used to encounter any error during procedure execution.
But now we recently installed SQL server 6.5 with service pack 5a(6.50.416) and i am facing problem during procedure execution if i pass col3 with invalid value.
Can anyone throw some light on this problem ?
Thank You,
Regards
Keerts
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|