select * from 表名 where 字段 in(×1,×2,×3,×4)
请问怎样才能让查询出来的内容按×1,×2,×3,×4的顺序依次显示出来呢?比如select * from 表名 where 字段(id) in(1,3,5,4)
怎样才能查询出来的内容按1,3,5,4依次显示呢?
请问怎样才能让查询出来的内容按×1,×2,×3,×4的顺序依次显示出来呢?比如select * from 表名 where 字段(id) in(1,3,5,4)
怎样才能查询出来的内容按1,3,5,4依次显示呢?
MS-SQL中
order by charindex(','+ltrim(ID)+',',',1,3,5,4,')