Created
March 30, 2017 08:05
-
-
Save bjdixon/d0a7bb4f04cea099df6d99c362956f4f to your computer and use it in GitHub Desktop.
Insert a record, if the pk already exists then update the record
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 IN tablename (id, val1, val2) VALUES (1, 'a', 'b') | |
ON DUPLICATE KEY UPDATE val1 = 'a', val2 = 'b'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment