MySQL Lists are EOL. Please join:

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

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

Delete from another table on update.Paul Halliday6 Feb
  • Re: Delete from another table on update.(Halász Sándor)6 Feb