How can I get a specific row (id=x) and then the reminders? Something like:
SELECT * FROM table ORDER BY id=5 FIRST THAN id DESC
I tried to use UNION ALL, like:
(SELECT * FROM table WHERE id=5)
UNION ALL
(SELECT * FROM table WHERE id!=5 ORDER BY id DESC)
but the result is unexpected since the second SELECT doesn’t return the registers ordered by id (desc). In addition, in this way is neccessary to write much more.
This will give you something like: 5, 1, 2, 3, 4, 6, 7, …