Advertisement

07.22.2003 at 12:19PM PDT, ID: 20686744
[x]
Attachment Details

Reset, renew or change the AutoIncrement values

Asked by Aknot in MySQL

Tags: change, autoincrement, mysql, value, reset

Hi all MySQL devs...

I need to change the AutoInc values to several tables in my MySQL server.
This to several reasons. But I can not find any pointers how to make this possible.

I have, for example a table starting at 1 (id:1) and it' s ending at 98 (id:98).
Now I need this values to starting at 5001 and upwards, eg:
5001, 5002, 5003, 5004 and so on...

When inserting a new id, I need the counter to continue after 5098, and that would be 5099 in this case.
I need the counter to continue working as normal after the changes to new autoincrement series of numbers.

Hope you understand what I mean =)

Im using the Win32 Ed and MySQL Front as editor. I can however access the
mysql-nt.exe if this is needed.

Best regards Pelle in Sweden...Start Free Trial
 
Loading Advertisement...
 
[+][-]07.22.2003 at 12:42PM PDT, ID: 8979761

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MySQL
Tags: change, autoincrement, mysql, value, reset
Sign Up Now!
Solution Provided By: Mr_Peerapol
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.22.2003 at 12:58PM PDT, ID: 8979899

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2003 at 01:14PM PDT, ID: 8980030

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2003 at 02:15PM PDT, ID: 8980540

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32