SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: Using SET NULL and SET DEFAULT with Foreign Key Constraints
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 08/12/2008 :  08:14:31  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
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

Slovenia
11750 Posts

Posted - 08/12/2008 :  08:26:25  Show Profile  Visit spirit1's Homepage  Reply with Quote
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 - 09/05/2008 :  04:43:56  Show Profile  Reply with Quote
the topic is good and taught in a very easy way. hats off
Go to Top of Page

ATrush
Starting Member

1 Posts

Posted - 09/11/2009 :  13:57:37  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000