Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> change foreign key value????
I have two tables: MASTER and DETAIL.
Master.INV_NO is the primary key
Detail has a fk constraint on INV_NO.
I want to create a utility to change an invoice number.
If I write
begin
Update Master set INV_NO = 2 where INV_NO = 1;
Update Detail set INV_NO = 2 where INV_NO = 1;
Commit;
end;
it fails because the constraint is violated temporarily.
Is there anyway to easily temporarily disable the FK constraint during a transaction. (i.e. disable until commit is called)??
thanks,
andy Received on Thu Oct 12 2000 - 10:42:18 CDT