Re: Updating Foreign Keys in Child Tables (ON DELETE CASCADE)
Date: 1995/05/19
Message-ID: <3pj13l$pd9_at_hammer.msfc.nasa.gov>#1/1
In article <3pina3$9mk_at_news.sandia.gov>,
Kevin Kinney <kvkinne_at_envc.sandia.gov> wrote:
>I am trying to update a primary key in one table which flows down into many
other
>tables, sometimes two or three levels. Is there a command similiar to ON
DELETE
>CASCADE, maybe called ON UPDATE CASCADE, which will let me update the parent
table
>and then cascade those changes to the child tables. Or is there a way to
handle this
>with some SQL.
>
What sort of data do you have common between the parent table and the child
tables? If it's just duplicate data, you probably don't need it in the child
tables. If the data in the child table is derived from the data in the parent
table, you might use a trigger on the parent table to update the child tables.
Robert Goodwin | phone: (205)461-4582 Database Development | fax: (205)461-4999 New Technology, Inc. | Huntsville, AL | e-mail: robert.goodwin_at_msfc.nasa.gov ----------------------------------------------------------------------"Soon anyone who's not on the World Wide Web will qualify for a government subsidy for the home-pageless." - Scott Adams
Received on Fri May 19 1995 - 00:00:00 CEST