Solved

How i can change the AUTO INCREMENT ?

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
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 …
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now