Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Problems with references
I have two tables like this:
CREATE TABLE FOO (
FOO_ID NUMBER NOT NULL,
CONSTRAINT FOO_PK PRIMARY KEY (FOO_ID));
and
CREATE TABLE BAR (
bar_ID NUMBER NOT NULL, bar_fkID NUMBER NOT NULL, CONSTRAINT BAR_PK PRIMARY KEY (BAR_ID), CONSTRAINT BAR_FK FOREIGN KEY (BAR_FKID) REFERENCES FOO (FOO_ID) ON DELETE CASCADE);
I have to change the Value of one Entry in the table foo and also in table
bar.
It is not possible to Update the values like this:
UPDATE FOO SET foo_id=2;
UPDATE BAR SET bar_fkid=2;
I think it has to be done in one command. According to the Oracle Reference the command
UPDATE FOO,BAR set foo_id=2, bar_fkid=2;
is possible but is not working.
some ideas
thanks
Martin
mailto:klauck_at_jet-online.de Received on Wed Jan 12 2000 - 08:28:31 CST
![]() |
![]() |