| sweta |
Posted: Jan 19, 2008 02:48:35 AM |
Total Post: 2
Joined: Jul, 2007
|
HI,
My name is Sweta Dave.My query is 'foreign key can be deleted if parent is present ?'.pls reply me as soon as possible. |
|
|
Mohammed Taj |
| Posted: Jan 19, 2008 03:00:10 AM | |
|
Total Post: 746
Joined: Jul, 2007
|
Yes you can delete foreign key value if primary key value exists but you can't delete primary key value when foreign key value exists.(except if you can use "on delete cascade" or "on delete null" keyword during creation of primary table)
|
|
|
|
|
Garlapati |
| Posted: Feb 04, 2008 05:45:39 AM | |
|
Total Post: 30
Joined: Apr, 2007
|
Yes We can delete foreignkey values from table(child) bacause foreign key table values are independent from primary key(master) table values it contains relation only so that we can delete.
child table is independent from master table so that we can.
and we can delete master data as well if child table contains data by using "ondelete cascade" force delete it is only in oracle9i.
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |