0

I am using phpMyAdmin and as I delete a row, it stuffs up the auto increment once I insert a new row.

Example:
Delete - 21
Insert - 22 (should be 21)

Thanks, Regards X

3
Contributors
6
Replies
10
Views
9 Years
Discussion Span
Last Post by mwasif
0

There must be a fix or way around.

This is a big problem which ive seen re occuring all the time.

Any Ideas?

Thanks, Regards X

0

Keep one thing in mind, if you have records till 30 and deletd 21. The next auto increment value should be 31 not 21. If you run the above provided query, you will be in trouble in this scenario.

0

Oh yes thats fine but im just wondering cause its a bug that been around for ages.

Example:
- I add a row with the wrong values and that takes up the auto increment of number 31
- I delete the row just added and insert another row and the auto increment number is 32

Can you see how annoying this is?

I think the idea is to ALTER rather than DELETE but :(

Anyone have any ideas be much appericated.

Thanks, Regards X

0

ALTER TABLE query takes a longgggggggggg time on a biggggggggggg table.

I don't think you need to remember the numbers, let this work done by the database.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.