Created
June 14, 2018 08:54
-
-
Save watershed/749ec83bcf58a38c2a29e4dad5800823 to your computer and use it in GitHub Desktop.
MySQL: update multiple rows for the same column/field
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
UPDATE table_name | |
SET field_to_update = CASE id | |
WHEN n THEN 'Text value' | |
END | |
WHERE id IN (n) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment