Solved

How i can change the AUTO INCREMENT ?

Posted on 2011-02-22
6
588 Views
Last Modified: 2013-11-08
Hello there, i have already table "videos" with many rows 800000+, how i can setup auto_increment to start from 1000000 not to continuie from 800000+, some sql commands ?
0
Comment
Question by:DjZoC
[X]
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
6 Comments
 
LVL 7

Expert Comment

by:MrNed
ID: 34958468
In PostgreSQL you can use:

ALTER SEQUENCE SEQ_NAME RESTART WITH 1000000;
0
 
LVL 7

Assisted Solution

by:MrNed
MrNed earned 250 total points
ID: 34958476
In MySQL you can try this: http://www.tutorialspoint.com/mysql/mysql-using-sequences.htm

You should state which database you're using, btw :)
0
 
LVL 11

Expert Comment

by:mattibutt
ID: 34959366
If you got phpmyadmin you can put the value you desire and hopefully it will after that based on the largest value+1
If you edit the column iu believe I will let you know how to do it step by step if required
0
 
LVL 1

Accepted Solution

by:
merjasec earned 250 total points
ID: 35211108
Try this SQL:

ALTER TABLE videos AUTO_INCREMENT = 1000000;

Open in new window

0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 37307704
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

626 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