3 ms·
http://lucumr.pocoo.org/2014/2/16/a-case-for-upserts/ http://lucumr.pocoo.org/2014/2/16/a-case-for-upserts/ "There is an obvious question what happens if there
by nieve 12y ago
http://lucumr.pocoo.org/2014/2/16/a-case-for-upserts/ http://lucumr.pocoo.org/2014/2/16/a-case-for-upserts/
"There is an obvious question what happens if there are two unique constraints on a table, and the answer is quite simply that it breaks down in that case. If there are two uniques MySQL will not give an error but just execute the operation as if it was happening on the first row that matches. Essentially the where is extended to be be an or for any of the unique constraints compared to the values from the insert statement. This is obviously dangerous and definitely not optional."