sqlite写法
SELECT * FROM example WHERE id IN('4','3','2','1') ORDER BY INSTR('4,3,2,1',id);
mysql写法
SELECT * FROM example WHERE id IN(4,3,2,1) ORDER BY INSTR(',4,3,2,1,',CONCAT(',',id,','));
oracle写法
select name from example where id in(4,3,2,1)order by instr('4,3,2,1',id);
sqlserver写法
Select * From example Where id in (4,3,2,1) Order By charindex(','+ id +',', ',4,3,2,1,');