Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Please allow me to state your question as I understand it! Your table has an auto-incrementing field. You have 37 (or say x) records in the table. The next record should be 37 (or x+1). But you are getting 40 (that is greater than x=1). Did you delete/erase some records? The auto-increment goes on adding to the last recorded value! So if you added serial no. 38 and 39 records and the erased these, the next record will be 40 not 38! Check "reset auto-increment" of your database. If you must have a serially numbered primary key do not use auto-increment.