rodrigosantosbr

User-defined order in select operation containing where

Sep 20th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select * from pessoas
  2. where matricula in (
  3. '2176629',
  4. '1586369',
  5. '2235897'
  6. )
  7. order by
  8. matricula='2176629' desc,
  9. matricula='1586369' desc,
  10. matricula='2235897' desc;
Add Comment
Please, Sign In to add comment