Inserting rows and modifiying existing auto_increment values
Posted: Thu May 13, 2004 8:02 am
Hey there:
Can anyone tell me if there is a way to insert a row into a database that has an auto_increment field and use an existing auto_increment value, and have the following values automatically bump themselves up?
For example, I have a field, "id" with 10 records. The id value is 1 ... 10. I want to insert a new record with id value 8, so that the existing 8 becomes 9, 9 becomes 10, and 10 becomes 11. And the new next auto_increment value is 12.
Any ideas?
Thanks,
Peter.
Can anyone tell me if there is a way to insert a row into a database that has an auto_increment field and use an existing auto_increment value, and have the following values automatically bump themselves up?
For example, I have a field, "id" with 10 records. The id value is 1 ... 10. I want to insert a new record with id value 8, so that the existing 8 becomes 9, 9 becomes 10, and 10 becomes 11. And the new next auto_increment value is 12.
Any ideas?
Thanks,
Peter.