MySQL Forums
Forum List  »  General

Re: foreign bug? about ON UPDATE SET NULL ON DELETE CASCADE
Posted by: Peter Brawley
Date: February 27, 2015 01:50PM

Your example can't work as your post indicates, because REPLACE deletes any row having a Primary or Unique key value matching the inserted value before it inserts the new value.

Therefore after ...

REPLACE INTO tab1 (col1, col2) VALUES (1,'zzzz');

... we have ...

select * from tab2;
+------+------+------+
| col3 | col4 | col5 |
+------+------+------+
|    3 | eeee |    2 |
+------+------+------+

Options: ReplyQuote


Subject
Written By
Posted
Re: foreign bug? about ON UPDATE SET NULL ON DELETE CASCADE
February 27, 2015 01:50PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.