List:General Discussion« Previous MessageNext Message »
From:(Hal Date:February 6 2012 8:15pm
Subject:Re: Delete from another table on update.
View as plain text  
>>>> 2012/02/06 11:33 -0400, Paul Halliday >>>>
Is it possible to wrap a DELETE statement in an ON DUPLICATE KEY UPDATE?

Something like: ON DUPLICATE KEY UPDATE host="b1" (DELETE FROM
another_table WHERE host="b1") ?
<<<<<<<<
No; see http://dev.mysql.com/doc/refman/5.5/en/insert.html

Such things are done in triggers, also if you only on duplicate key want the deletion.

Thread
Delete from another table on update.Paul Halliday6 Feb
  • Re: Delete from another table on update.hsv6 Feb