Solved

How i can change the AUTO INCREMENT ?

Posted on 2011-02-22
6
580 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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

733 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