Re: UPSERT with non-unique index
"J.O. Aho" <[email protected]> Mon, 3 Aug 2020 11:38:14 +0200
| Newsgroups | comp.databases.mysql |
|---|---|
| Message-ID | <[email protected]> |
On 03/08/2020 11.05, The Natural Philosopher wrote: > On 02/08/2020 22:46, Lew Pitcher wrote: >> I'd roll the whole thing in a transaction >> >> START TRANSACTION; >> >> -- your sql goes here >> >> COMMIT; >> >> > I don't use SQL often enough to remember that it has transactions these > days :-( Yeah, it's quite recently they introduced xa transactions in MySQL, 2005. > Note that you appear to need to be using innoDB or another advanced > engine and not MyISAM if you want to use transactions Yes, you need a db-engine like InnoDB or XtraDB which both support xa transactions. -- //Aho