• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 598
  • Last Modified:

How i can change the AUTO INCREMENT ?

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
DjZoC
Asked:
DjZoC
2 Solutions
 
MrNedCommented:
In PostgreSQL you can use:

ALTER SEQUENCE SEQ_NAME RESTART WITH 1000000;
0
 
MrNedCommented:
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
 
mattibuttCommented:
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
 
merjasecCommented:
Try this SQL:

ALTER TABLE videos AUTO_INCREMENT = 1000000;

Open in new window

0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now