Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save iamshanto/18dd3946096364a227db325ff4e4215f to your computer and use it in GitHub Desktop.
Save iamshanto/18dd3946096364a227db325ff4e4215f to your computer and use it in GitHub Desktop.
-- https://blog.bubble.ro/how-to-make-multiple-updates-using-a-single-query-in-mysql/
UPDATE mytable
SET (title='Great Expectations' WHERE id='1'),
(title='War and Peace' WHERE id='2');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment