On 12/04/2015 01:55 PM, Nana Okyere wrote: > Much thanks. > I think you may have hinted on something about the order in which the > database returns rows. I thought that it always returns the rows in the > order they were inserted. From what you're saying, that's a wrong > assumption. So to give you a little more info, the data being written to > the database is from an excel sheet. Ultimately, I wanted to query and > display the first 10 rows of the excel sheet after the data has been > inserted / written onto the table. I don't have an autoincrement / > serial/ sequence field unfortunately. Is there anything else I can do to > return the first 10 inserted rows in their correct order? Thanks again.
when emitting SELECT on a database table, you use ORDER BY in order to return the rows in a specific order. Without using ORDER BY, the ordering of rows you get back is undefined. > > -- > You received this message because you are subscribed to the Google > Groups "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to sqlalchemy+unsubscr...@googlegroups.com > <mailto:sqlalchemy+unsubscr...@googlegroups.com>. > To post to this group, send email to sqlalchemy@googlegroups.com > <mailto:sqlalchemy@googlegroups.com>. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.