Deleting a row but keeping the Foreign Key [message #341603] |
Tue, 19 August 2008 08:55  |
amardilo
Messages: 37 Registered: February 2007
|
Member |
|
|
Hi,
I am not sure if this is possible or answered elsewhere or makes sense but here goes.....
I have an existing table (i.e. address table) which has an ID column which is used as a foreign key in a lot of different tables (i.e. delivery table).
I need to remove a few rows from this table however there are loads of other tables which reference the rows ID as a foreign key and I can't delete those.
Is there a way to delete these rows without effecting the tables that reference it as a foreign key? Is the only way to drop the constraint or can I alter it in some way to enforce the constraint on Inserts and Updates (and to a lessor extent Selects) but not being enforced for deletes?
|
|
|
|
|
|
Re: Deleting a row but keeping the Foreign Key [message #341623 is a reply to message #341621] |
Tue, 19 August 2008 10:19  |
amardilo
Messages: 37 Registered: February 2007
|
Member |
|
|
Michel Cadot wrote on Tue, 19 August 2008 10:15 | You can't alter an existing constraint you have to recreate it (afaik).
No way to have a dummy ID (Oracle does not support "on delete set default" or the like), but isn't NULL a "dummy" ID?
Regards
Michel
|
Thanks for the info.
|
|
|