一张 很简单的表 test
id no 1 a11
2 b22
3 b33
4 b44select * from test where id in( 2,1,3)
我想要搜索出来的结果能根据in里面的ID进行排序
既按照 id
2
1
3知道可以通过以下实现
select * from test where id = 2
union all
select * from test where id = 1
union all
select * from test where id = 3但跪求更简单高效的方法
id no 1 a11
2 b22
3 b33
4 b44select * from test where id in( 2,1,3)
我想要搜索出来的结果能根据in里面的ID进行排序
既按照 id
2
1
3知道可以通过以下实现
select * from test where id = 2
union all
select * from test where id = 1
union all
select * from test where id = 3但跪求更简单高效的方法
解决方案 »
- 解析证书出错!invalid DER-encoded certificate data
- 请大家指导指导
- RabbitMQ中产生的1.rdq,2.rdq...在如何自动清除
- 求教FTP下载问题
- JSF实现选项卡的可用和不可用报错???
- Unable to verify action class [CustomerAction] exists at initialization
- 大家给点意见
- 数据库跟MYECLIPSE连接问题
- linux+htmlparser解析中文乱码,请高手提供解决方案,在线给分100分!
- 怎么一创建CachedRowSet rowset = new CachedRowSetImpl();就出错,在线等,谢谢了
- 秒杀java实现
- rich:calendar控件如何验证空
select *
from test
where id in( 2,1,3)
order by decode(id,'2',1,'1',2,'3',3)
from test
where id in( 2,1,3)