Posted on 2006-03-28
Last Modified: 2008-01-16
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
Question by:modsiw
    LVL 3

    Author Comment

    woops, first line should read

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

    Accepted Solution

    I don't think there is one for update. May be you can create a "on update trigger" to manually do this.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    As400 Db2 to MS Sql server (data/schema) only 6 311
    DB2 Iseries SQL failing to update multiple records 15 322
    DB2 error. 37 60
    SQL400 max size 5 35
    November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
    Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now