Skip to content

Instantly share code, notes, and snippets.

@Sannis
Created March 2, 2012 18:23
Show Gist options
  • Save Sannis/1960187 to your computer and use it in GitHub Desktop.
Save Sannis/1960187 to your computer and use it in GitHub Desktop.
SELECT * FROM table WHERE price = (SELECT MAX(price) FROM table);
vs
SELECT * FROM table ORDER BY price DESC LIMIT 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment