At 15:24, 19990808, Christos J. Pontikis wrote:
>I suppose that an SQL statement like "SELECT * FROM sometable"
>(without an ORDER BY id clause) will keep the auto_increment ID
>order. (MySQL 3.21.33)
>But, when I delete a record and after I am inserting another,
>the new record appears with the order of the deleted one (even
>if its ID is the biggest in this table).
>Am I doing something wrong ???
Yes. You are expecting a some order in the results when you are
not using an ORDER BY clause. There is NO order guaranteed, or
even suggested, in the results of a query with no ORDER BY clause.
They're not ordered by ID, by primary key, by time of insertion,
by size of node on disk, or any other arbitrary thing. They're
just not ordered.
SQL works with sets; sets are not ordered. If there is any order
in your data, you have to tell the RDBMS about it using the ORDER
Another poster said that MySQL was doing the