下面的SQL语句怎么写?
我用的是SQLITE数据库
我想查询时按 in 的内容排序 该怎么写 如:
select * from xx c1 in('1','2','5')
[解决办法]
没什么好办法。
- SQL code
select * from xx where c1 in('1','2','5')order by case c1 when '1' then 1 when '2' then 2 when '5' then 3 end 发布时间: 2012-03-07 09:13:51 作者: rapoo
下面的SQL语句怎么写?
我用的是SQLITE数据库
我想查询时按 in 的内容排序 该怎么写 如:
select * from xx c1 in('1','2','5')
[解决办法]
没什么好办法。
select * from xx where c1 in('1','2','5')order by case c1 when '1' then 1 when '2' then 2 when '5' then 3 end