How can I order DESC by a field, but list the NULL values first?
So I\'m having a table:
reuestId | offerId | offerTitle 1 | 1 | Alfa NU
SELECT * FROM TableX ORDER BY (requestId IS NOT NULL) , requestId DESC
Try this:
ORDER BY [reuestId] IS NULL DESC, [reuestId] DESC
should work (for mySql)