排序的时候,怎么让某个指定的记录排在第一,其他按时间排序

排序的时候,如何让某个指定的记录排在第一,其他按时间排序!谢谢大家!比如在网页上传递某个id,让这个id的记

排序的时候,如何让某个指定的记录排在第一,其他按时间排序!
谢谢大家!

比如在网页上传递某个id,让这个id的记录排在第一,其他按照时间倒序排列!

[解决办法]
--假如ID為10
Order By (Case When ID = 10 Then 0 Else 1 End), 时间 Desc
[解决办法]
select * from table order by case when id = 排在第一的列 then 0 else 1 end,时间字段 Desc