Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Problems with references

Problems with references

From: Klauck Martin <klauck_at_jet-online.de>
Date: Wed, 12 Jan 2000 15:28:31 +0100
Message-ID: <85i38s$3i0tb$1@hades.rz.uni-sb.de>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US