MySQL Forums
Forum List  »  Newbie

Deleting entries, primary key holes
Posted by: hiltonchim
Date: June 11, 2005 02:26PM

Hello, I have one simple table that looks like this:

create table Tech(
techID int not null auto_increment,
techName varchar(50),
techDescription longtext,
techOriginal text,
techThumb text,

primary key(techID)
) engine = innodb;


Whenever I delete an entry in the middle, it leaves a gap in the primary keys sequence. I want all the primary keys for each entry to adjust itself every time I delete an entry so that the primary keys starts from 1 to n with NO holes in the sequence. How do I do this?

Thanks in advance.

Options: ReplyQuote


Subject
Written By
Posted
Deleting entries, primary key holes
June 11, 2005 02:26PM


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.