Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

MySQL Auto Increment Seed

Posted on 2010-09-02
4
1,538 Views
Last Modified: 2012-05-10
How do I change the auto increment seed number in MySQL? The higher ups have voted against me on database design standards and now I have the need to start a AI field at 222000000, and I can't figure out how to do this.

Any and all help is appreciated. BTW it's MySQL running on windows.
0
Comment
Question by:gnixon14
  • 2
4 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 33589500
If it is a MyISAM table, you can use MySQL Administrator and it's Table Editor and change it in the Advanced Options tab.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33589527
If you have phpMyAdmin, you can change it on the 'Operations' page for the table.  In either case, you need to make sure your column is at least int(9) to display all the numbers.
0
 
LVL 2

Expert Comment

by:IngCharlie
ID: 33589547
OR USE THE SQL:

ALTER TABLE `your_table` AUTO_INCREMENT =222000000
0
 

Author Closing Comment

by:gnixon14
ID: 33589582
Excellent, thank you so much. I tried the sames setting in the MySQL workbench and it didn't work, but MySQL admin came thru. Thanks again.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question