Home » SQL & PL/SQL » SQL & PL/SQL » Default Foreign key setup
Default Foreign key setup [message #342450] Fri, 22 August 2008 06:51 Go to next message
mo_mughrabi
Messages: 6
Registered: May 2008
Junior Member
Hi all, I was wondering if I created a foreign key relation between two tables without specifying how it should cascade. What is the default setup will be? any idea?

Thanks
Re: Default Foreign key setup [message #342453 is a reply to message #342450] Fri, 22 August 2008 07:02 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The default is no cascade, so no delete is allowed if there are children.

Just read the doc:
Quote:
If you omit this clause, then Oracle does not allow you to delete referenced key values in the parent table that have dependent rows in the child table.


Regards
Michel

[Updated on: Fri, 22 August 2008 07:04]

Report message to a moderator

Re: Default Foreign key setup [message #342461 is a reply to message #342453] Fri, 22 August 2008 07:26 Go to previous message
mo_mughrabi
Messages: 6
Registered: May 2008
Junior Member
Thanks a lot, that's very helpful:)
Previous Topic: Selecting Distinct values
Next Topic: Other way of doing query
Goto Forum:
  


Current Time: Sat Dec 10 12:34:13 CST 2016

Total time taken to generate the page: 0.07454 seconds