Created
September 13, 2019 20:26
-
-
Save cramhead/5d6d7c233be32668ef7ce76cfc828091 to your computer and use it in GitHub Desktop.
Updates rows when the ids conflict with existing data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO user (id, uid) VALUES (1, 'uid1'), (2, 'uid2'), (3, 'uid3') ON DUPLICATE KEY UPDATE id=VALUES(id), uid=VALUES(uid); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment