Skip to content

Instantly share code, notes, and snippets.

@kenn
Last active December 26, 2015 01:28
Show Gist options
  • Save kenn/7071032 to your computer and use it in GitHub Desktop.
Save kenn/7071032 to your computer and use it in GitHub Desktop.
SELECT * FROM
(SELECT id FROM sort_keys ORDER BY sort_key) INNER JOIN main_table ON sort_keys.id = main_table.id
WHERE ... OFFSET 0 LIMIT 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment