MySQL Forums
Forum List  »  MySQL Query Browser

update auto incremented id in consecutive way
Posted by: ripa saha
Date: July 16, 2013 02:11AM

Hello Everybody,

I want to know , are there any way to make auto incremented field in consecutive way when I am deleting a record. My requirement is below:-

id sequence before delete
{1 , 2 , 3 , 4 , 5}

Now I deleted id 3 , then in general format , id sequence will be like below
{1 , 2 , 4 , 5}

But I want , When id 3 will be deleted then id 4 will be automatically shifted to id 3 and 5 in 4.
{1 , 2 , 3 , 4}

Thanks id Advance

Options: ReplyQuote


Subject
Written By
Posted
update auto incremented id in consecutive way
July 16, 2013 02:11AM


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.