请教一个排序的问题 在线等表的主键是idselect * from table where id in (14,23,33,6,5,4,18)默认情况是
请教一个排序的问题 在线等
表的主键是id
select * from table where id in (14,23,33,6,5,4,18)
默认情况是按id的asc排序的
但是我现在想让结果按in里面的id顺序排,如何写
[解决办法]
定义参数呗
select * from 表
where id in @a
order by 后面一堆
