mysql查询按照in里面的数据排序
SELECT `sku` ,`current_price`
FROM `test`
WHERE `sku`
IN (
'aaa', 'bbb', 'ccc', 'ddd', 'eee'
)
ORDER BY FIELD( `sku` , 'aaa', 'bbb', 'ccc', 'ddd', 'eee' )
SELECT `sku` ,`current_price`
FROM `test`
WHERE `sku`
IN (
'aaa', 'bbb', 'ccc', 'ddd', 'eee'
)
ORDER BY FIELD( `sku` , 'aaa', 'bbb', 'ccc', 'ddd', 'eee' )