and their combined thousands of votes and dozens of answers, all full of awkward workaround or ill-performing or specialised-for-one-database-engine code for this common and desirable thing which would be trivial with a couple of boring loops in Python.
People who want it, want it with an order.
Look at
https://stackoverflow.com/questions/121387/fetch-the-row-whi...
and
https://stackoverflow.com/questions/3800551/select-first-row...
and
https://stackoverflow.com/questions/8748986/get-records-with...
and their combined thousands of votes and dozens of answers, all full of awkward workaround or ill-performing or specialised-for-one-database-engine code for this common and desirable thing which would be trivial with a couple of boring loops in Python.