"Gitte und Ingolf" <[EMAIL PROTECTED]> wrote: > Hi out there, > > i.m using InnoDB with foreign key constraints and i.m looking for the > default behavior of ON DELETE and ON UPDATE. > > Secondly, what does the ON UPDATE NO ACTION option means? Ist the way it is > used in db2, that every child row must have some matching parent row. If > this condition is not met,the Update fails and all changes are rolled back? > Or is the Update done?
Currently NO ACTION does nothing. In a future it will work the same as RESTRICT: if you update referenced column and there are any matching rows in the referencing table, the update will fail. > What is the meaning of ON UPDATE CASCADE and ON UPDATE SET NULL?? If you specify ON UPDATE CASCADE, every time you update row in the parent table, InnoDB will automatically update corresponding foreign key column in all matching rows in the child table to the same value. ON UPDATE SET NULL means that every time you update row in the parent table, InnoDB will automatically set corresponding foreign key column in every matching rows of the child table to NULL. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
