MySQL Forums
Forum List  »  Newbie

records not listed correctly after delete...
Posted by: Andrew Anderson
Date: June 03, 2005 07:05PM

I am very new to the MySQL thing so please excuse my ignorance.

Ther problem is that when I make a table and assign the column "ID" as the primary key and auto increment it - I run into problems. As long as I keep adding records things work fine. The "ID" jumps to the next number like it should

ID NAME AGE

1 NAME AGE
2 NAME AGE
3 NAME AGE
4 NAME AGE

ETC...

If I delete row 2 though (using delete from table where ID='2') and then add another entry - the numbers get all messed up:

ID NAME AGE

1 NAME AGE
5 NAME AGE
3 NAME AGE
4 NAME AGE
6 NAME AGE

I don't know why this is happening, but I know it shoudn't. Please advise me on how to get the records to number correctly even after a delete.

I'm running MySQL 3.23.58 on Fedora Core 3.

Thank you very much for your time!

Andrew D. Anderson

Options: ReplyQuote


Subject
Written By
Posted
records not listed correctly after delete...
June 03, 2005 07:05PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.