if you are interested in selecting records in the order in which they were inserted, apply an auto-increment/identity field to your table schema and when you select, use ORDER BY on that field. This is the only guaranteed way to retrieve records in the order in which they were inserted.
> -----Original Message----- > From: Thi Cao [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 11, 2002 6:09 PM > To: MySQL > Subject: MySQL concept question > > > All, > > When I insert records into a database, the records will be > inserted in the > order that I have them listed in my insert statement. So my > question is, > will the MySQL database always return the records in the > order of insertion > when I perform any type of select query in the future? Of course, I'm > excluding queries that specify an order with the 'ORDER BY' > clause. Does > the MySQL database maintain some type of internal ordering ID for each > record, and if so, can I always rely on the database to give > me the records > back as I have given to it? I know I can specify an order by having a > column with some type of ordering value, but that's not what > I'm interested > in, so any answers to the above questions would be much appreciated. > > T.I.A. > > Thi > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php