如何把其他这个人放到最后边查出来放到list里 再进行排序就可以了 别越做越麻烦 本身就放到list中 select * from (select * from table where id != 4 order by id) union all select * from table where id = 4 union all oracle中能用吗? union all 就是在ORACLE里用的,性能也高 阿美告诉我: 这本身是一个很不友好的东东。
select id, case when id=4 then 999 else id end as order_id name from table order by order_id 用存储过程不就好了,或者直接2条sql 当然,用union all也不错