Jump to content


Photo

How to auto_increment from a number?


  • Please log in to reply
2 replies to this topic

#1 dragonusthei

dragonusthei
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 17 October 2006 - 06:16 PM

How can i set the number to auto_increment from higher than 0?

Say i want to start auto_increment from 200 insted of the default 0 how would i go about it?

#2 LazyJones

LazyJones
  • Members
  • PipPipPip
  • Advanced Member
  • 78 posts

Posted 17 October 2006 - 06:28 PM

From http://dev.mysql.com...-increment.html
"
To start with an AUTO_INCREMENT value other than 1, you can set that value with CREATE TABLE or ALTER TABLE, like this:

mysql> ALTER TABLE tbl AUTO_INCREMENT = 100;
"

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 17 October 2006 - 10:12 PM

I won't even ask why it matters so much.

LazyJones is back!!! ;-)
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users