db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Евгений Никулов <niku...@ulk.ru>
Subject User's question
Date Thu, 18 Sep 2008 01:03:36 GMT
 

  Hello.

  Would you be so kind as answer on my question?

  How can I do cascade update in the Derby Java DB.

  The following code begets a mistake:

 

  CREATE TABLE "COUNTRIES" (

      "ID"              INTEGER not null generated by default as identity
(START WITH 1, INCREMENT BY 1),

      "NAME"            VARCHAR(50) not null,

 

      CONSTRAINT coun_pk 

      PRIMARY KEY(ID)

 

  );

 

  CREATE TABLE "LANGUAGES" (

      "ID_COUNTRY"      INTEGER not null,

      "LANGUAGE"        VARCHAR(50),

 

      CONSTRAINT lang_fk

      FOREIGN KEY (ID_COUNTRY)

      REFERENCES COUNTRIES (ID)

      ON DELETE CASCADE

      ON UPDATE CASCADE (string of error)

 

);

 

Error code -1, SQL state 42X01: Syntax error: Encountered "CASCADE" at line
: (string of error)

 

Yours faithfully, Eugene Nikulov

 

My email: genenik@gmail.com

 


Mime
View raw message