Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problems with references
Klauck Martin wrote:
>
> 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.
What is the error you are receiving?
.................................................Received on Wed Jan 12 2000 - 09:10:04 CST