If I have a query such as :
select * from tbl where id in (10, 20, 9, 4);
the results returned could potentially be in this order: 4, 9, 10, 20
but what if was looking to maintain the order of the list passed into the initial query? how would you approach this?
Ultimately I'm using Django as the ORM for my app here but I'm looking to investigate what is feasible at db level first.
Any ideas most welcome!