ON DELETE CASCADE question
ON DELETE CASCADE question
От:
Wei Weng <wweng@kencast.com>
Дата:
Does ON DELETE CASCADE attribute you specify in CREATE TABLE statement actually create triggers for every foreign key it refers to? Thanks! -- Wei Weng Network Software Engineer KenCast Inc.
Re: ON DELETE CASCADE question
От:
"Josh Berkus" <josh@agliodbs.com>
Дата:
Wei, > Does ON DELETE CASCADE attribute you specify in CREATE TABLE > statement > actually create triggers for every foreign key it refers to? > Yes. Two triggers for each key, I think. -Josh
Re: ON DELETE CASCADE question
От:
Jan Wieck <JanWieck@Yahoo.com>
Дата:
Josh Berkus wrote: > > Wei, > > > Does ON DELETE CASCADE attribute you specify in CREATE TABLE > > statement > > actually create triggers for every foreign key it refers to? > > > > Yes. Two triggers for each key, I think. Three, one for INSERT OR UPDATE on the FK table, one for UPDATE on the PK table and one for DELETE on PK. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #