In MySQL while using IN operator can we ask MySQL to return result-set(record-set) in same order as the IN set was?
explanation:
Suppose we have a table
items (item_id, item_name);
and the query:
select * from items where item_id in (1,3,5,7,2,4,6,8);
can we have the result-set(record-set) where the records are in same order as IN operator set.
i.e 1,3,5,7,2,4,6,8 of record_id
s
This isn't the case; MySQL seems to optimise out the search and gives the default order(same as order of those records stored on File-system).