Skip to content

Instantly share code, notes, and snippets.

@simonista
Created May 7, 2012 22:40
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 simonista/2631125 to your computer and use it in GitHub Desktop.
Save simonista/2631125 to your computer and use it in GitHub Desktop.
sql-question
select id, avatar_image_url as aiu from users order by aiu; -- works!
select id, avatar_image_url as aiu from users order by coalesce(avatar_image_url, 'zzz'); -- works!
select id, avatar_image_url as aiu from users order by coalesce(aiu, 'zzz'); -- doesn't work :(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment