Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 Article Discussion
 Article: Using SET NULL and SET DEFAULT with Foreign Key Constraints

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2008-08-12 : 08:14:31
Cascading Updates and Deletes, introduced with SQL Server 2000, were such an important, crucial feature that it is hard to imagine providing referential integrity without them. One of the new features in SQL Server 2005 that hasn't gotten a lot of press from what I've read is the new options for the ON DELETE and ON UPDATE clauses: SET NULL and SET DEFAULT. Let's take a look!


Read Using SET NULL and SET DEFAULT with Foreign Key Constraints

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-08-12 : 08:26:25
cool! didn't know that.

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!
Go to Top of Page

dineshrajan_it
Posting Yak Master

217 Posts

Posted - 2008-09-05 : 04:43:56
the topic is good and taught in a very easy way. hats off
Go to Top of Page

ATrush
Starting Member

1 Post

Posted - 2009-09-11 : 13:57:37
I guess it is worth to mention that it is possible to assign a default value that is not in the set of primary keys but it impossible, after that, to insert a record with a default value. From another side you could not delete a record in a parent table with a primary key equels to default value in case if you have a referenced record in a child table.
Go to Top of Page
   

- Advertisement -