default value for Auto increment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • praveena mani
    New Member
    • Sep 2007
    • 16

    #1

    default value for Auto increment

    how to specify a default value for auto increment??
    for innodb engine..
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    The auto-increment IS the default

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Heya, Praveena.

      Note that MySQL doesn't care what the AUTO_INCREMENT value for the table is, so long as it is unique. There's no reason why your records have to start with ID 1, for example.

      But if you're dead-set on changing it:
      [code=mysql]
      ALTER TABLE `table name` AUTO_INCREMENT= new_value;
      [/code]

      Comment

      Working...