当前位置: 代码迷 >> 其他数据库 >> 下面的SQL语句如何写
  详细解决方案

下面的SQL语句如何写

热度:3464   发布时间:2013-02-26 00:00:00.0
下面的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
  相关解决方案