mysql order by, null first, and DESC after January 23, 2023 by Tarik Try this: ORDER BY [reuestId] IS NULL DESC, [reuestId] DESC should work (for mySql)