Vasja Pupkin wrote:
Is there any chance to implement such statement in derby?
CREATE TABLE A (
ax INTEGER NOT NULL,
PRIMARY KEY(ax)
);
CREATE TABLE B (
bx INTEGER NOT NULL,
FOREIGN KEY (bx) REFERENCES A (ax)
ON UPDATE CASCADE -- can't make this work
UPDATE CASCADE in derby
÷
÷Is there any chance to implement such statement in derby?
÷
÷CREATE TABLE A (
÷ax INTEGER NOT NULL,
÷
÷PRIMARY KEY(ax)
÷);
÷
÷CREATE TABLE B (
÷
÷bx INTEGER NOT NULL,
÷
÷FOREIGN KEY (bx) REFERENCES A (ax)
÷ON UPDATE CASCADE -- can't make this
Is there any chance to implement such statement in derby?
CREATE TABLE A (
ax INTEGER NOT NULL,
PRIMARY KEY(ax)
);
CREATE TABLE B (
bx INTEGER NOT NULL,
FOREIGN KEY (bx) REFERENCES A (ax)
ON UPDATE CASCADE -- can't make this work
ON DELETE CASCADE
);
DRSII-SQLJ-16357)
the options for ON UPDATE are
NO ACTION and RESTRICT, but I would need ON UPDATE
CASCADE:
FOREIGN KEY
(VrstaId) REFERENCES VrstaPrevoza(VrstaId) ON UPDATE
CASCADE;
This is possible in PostgreSQL but obviously not in Derby. How
do other users handle cascade updat
rstaId='AB' WHERE VrstaId='MK';ERROR 23503: UPDATE on table 'VRSTAPREVOZA' caused a violation of foreign key constraint 'SQL050403042438881' for key (MK). The statement has been rolled back.
---
I would expect to be able to
n
of foreign key constraint 'SQL050403042438881' for key (MK). The
statement has been rolled back.
-------
I would expect to be
able to define the foreign key like
FOREIGN KEY
(VrstaId) REFERENCES VrstaPrevoza(VrstaId) ON UPDATE
CASCADE;
but this doesn't
work in Derby.
How to implement
"UPDATE CASCADE"??
Many
thanks!
Andrej
n
of foreign key constraint 'SQL050403042438881' for key (MK). The
statement has been rolled back.
-------
I would expect to be
able to define the foreign key like
FOREIGN KEY
(VrstaId) REFERENCES VrstaPrevoza(VrstaId) ON UPDATE
CASCADE;
but this doesn't
work in Derby.
How to implement
"UPDATE CASCADE"??
Many
thanks!
Andrej