select * from product where productId in(25,36,40,1,50) order by find_in_set(productId, '25,36,40,1,50'); Zobrazit tento SQLFiddle