ON DELETE CASCADE PROBLEM

From: kotsos <fakidomitis_at_yahoo.gr>
Date: Sun, 21 Dec 2003 22:49:39 +0200
Message-ID: <bs5114$630$1_at_usenet.otenet.gr>



Hi ...

[Quoted] I'm a newbie in Oracle 8i and I have the following problem:

I created two tables as follows:
CREATE TABLE pelates

    (kodikos_pelath                 NUMBER(5,0) NOT NULL,

    onomateponymo                  VARCHAR2(30) NOT NULL,

    polh                           VARCHAR2(15) NOT NULL)

/

ALTER TABLE pelates

ADD CONSTRAINT pk_kodikos_pelath PRIMARY KEY (kodikos_pelath)

/

CREATE TABLE aytokinhta

    (kodikos_aytokinhtoy NUMBER(5,0) NOT NULL,

    kataskeyasths                  VARCHAR2(20),

    montelo                        VARCHAR2(20),

    pinakida                       VARCHAR2(7) NOT NULL,

    kodikos_idiokthth              NUMBER(5,0) NOT NULL)

/

ALTER TABLE aytokinhta

ADD CONSTRAINT pk_kodikos_aytokinhtoy PRIMARY KEY (kodikos_aytokinhtoy)

/

ALTER TABLE aytokinhta

ADD CONSTRAINT fk_to_pelates FOREIGN KEY (kodikos_idiokthth)

REFERENCES pelates (kodikos_pelath)on delete cascade

/

 ... and I filled them with values

But whenever I try to delete some rows from pelates, then a message appears [Quoted] concerning the foreign key constraint (of table aytokinhta) although I declared the "on delete cascade" option....

Any ideas?

Thank you... Received on Sun Dec 21 2003 - 21:49:39 CET

Original text of this message