You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you execute an SQL statement like this: INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1; Your original solution contains the following error. If you try to insert a duplicate key, the INSERT statement is not executed and the SQL statement returns 0. But the subsequent UPDATE changed some rows, so one should expect that the function returns the number of updated rows.
If you execute an SQL statement like this: INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1; Your original solution contains the following error. If you try to insert a duplicate key, the INSERT statement is not executed and the SQL statement returns 0. But the subsequent UPDATE changed some rows, so one should expect that the function returns the number of updated rows.
The text was updated successfully, but these errors were encountered: