sqlserver把任意一列放到第一列并顺序排列

请用一句sql写出将id为1234放到表的第一列,其他紧随其后并以正序排列的查询语句。

答案:

select * from table where ID=2
union all
select * from table where ID <>2 order by id desc

posted @ 2016-02-23 10:53  adminasliulin  阅读(1004)  评论(0编辑  收藏  举报