Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FK for preventing parental deletions.
Message
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
00720778
Message ID:
00724051
Views:
19
>>Are you sure? You mean if I have a foreign key relationship defined, I have to delete the child records before you delete the parent record. Mabey Im just reading this wrong...
>
>Yes. The FK constraint will throw an exception if you try to remove the parent and children exist, if cascading deletes are not enabled. Also, an exception will be thrown if you try to use a parent ID in the child row that doesn't exist.
>
>-Mike

You were right on both counts in regards to when errors are generated. I was under the same impression as Bob Archer, but it appears that you can only develop orpans/widows when there is no FK at all. Thanks again, Mike!
Previous
Reply
Map
View

Click here to load this message in the networking platform