Skip to content

Instantly share code, notes, and snippets.

@ryanb
Created December 10, 2009 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanb/253602 to your computer and use it in GitHub Desktop.
Save ryanb/253602 to your computer and use it in GitHub Desktop.
/* Given these SQL commands */
update books set author="Bob" where id=1;
update books set author="John" where id=2;
update books set author="Bob" where id=3;
/* I want this output (and it should work with more complex scenarios) */
update books set author="Bob" where id in (1, 3);
update books set author="John" where id=2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment