Skip to content

Instantly share code, notes, and snippets.

@chriskief
Created January 13, 2015 04:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save chriskief/129a122feedd0d8ae90e to your computer and use it in GitHub Desktop.
SELECT id, name
FROM table
WHERE name IN (9, 8, 1, 2, 7, 3)
ORDER BY FIELD(id, 9, 8, 1, 2, 7, 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment