November 17, 2003 at 11:40 pm
Can any one help me to know the sequence in which the constrains are fired
ex.Check constraints, Foreign Key, Rule, trigger, Primary key check
Thanks
Sreekumar
November 20, 2003 at 9:43 am
Wow, great question. I'll try to dig around a little, but my impression is that these are fired like this:
check constraint
rule
PK
FK
trigger
Rules are an old feature, only one per column and check constraints are the newer recommended feature for validating data. Since PKs and FKs are also constraints of a different nature. Since check constraints are evaluated in the order created, an educated guess might be that all these constraints will be evaluated in the order created. Have to do some more digging, however.
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
November 20, 2003 at 9:01 pm
Thanks Steave!!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply