Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. name n/s distfromc
  2. BH n 2
  3. FV n 1
  4. C c 0
  5. RS s 1
  6. MTN s 2
  7.  
  8. SELECT tablename.*
  9. FROM tablename
  10. ORDER BY
  11. `n/s` = 'n' DESC,
  12. CASE WHEN `n/s` = 'n' THEN distfromc END DESC,
  13. CASE WHEN `n/s` != 'n' THEN distfromc END ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement