That's how dbs work. When rows are deleted, they reclaim that space when new rows are inserted. Hence, there is no "last row" (in fact, no order at all) unless you explicitly order the results in your select. That's what ORDER BY is for. Try

  SELECT autoinc_field, data_field FROM yourtable ORDER BY autoinc_field;

By the way, if you are really using mysql 4.0.2, you should consider an upgrade. 4.0.2 is over 2 years old. The current version is 4.0.20, and there have been a lot of improvements and bug fixes since 4.0.2.

Michael

Cres Justado wrote:
can anyone help me with my problem regarding mysql 4.0.2. I'm having a problem with the sequencing of the auto incremnt field. if my application makes an insert mysql inserts the new row somewhere in the middle of the sequence. example

autoinc_field   data_field
1                   qwe
2                   ert
3                   ou
20                 oiu
4                  ngf
5                  ljn
.
.
.
.
18                okj
19                thd

in my example the row 20 was inserted in the middle of the sequence instead of inserting it in the last row.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to