Link to home
Start Free TrialLog in
Avatar of modsiw
modsiw

asked on

DB2 and ON UPDATE CASCADE

Is there a DB2 counterpart of (version 7) of ON UPDATE CASCADE?


Example of my issue:

CREATE TABLE account_zipcode
(
  account_id  INTEGER     NOT NULL,
  zipcode     VARCHAR(10) NOT NULL,
  description VARCHAR(30) NOT NULL,

  CONSTRAINT PK  PRIMARY KEY (account_id, zipcode),
  CONSTRAINT FK1 FOREIGN KEY (account_id) REFERENCES account(account_id)
)


CREATE TABLE account_zipcode_group
(
  account_id  INTEGER     NOT NULL,
  description VARCHAR(30) NOT NULL,
  zipcode     VARCHAR(10) NOT NULL,

  CONSTRAINT PK  PRIMARY KEY (account_id, description, zipcode),
  CONSTRAINT FK1 FOREIGN KEY (account_id)          REFERENCES account(account_id),
  CONSTRAINT FK2 FOREIGN KEY (account_id, zipcode) REFERENCES account_zipcode(account_id, zipcode) ON UPDATE CASCADE
)
Avatar of modsiw
modsiw

ASKER

woops, first line should read

Is there a DB2(version 7) counterpart of ON UPDATE CASCADE?
ASKER CERTIFIED SOLUTION
Avatar of db2inst1
db2inst1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial