Change autoincrementing number in mysql

Discussion in 'MySQL' started by Kain, Sep 4, 2008.

  1. #1
    I'm writing an online invoice system in php / mysql which is using the auto incrementing id field as the invoice number.

    I want to start the numbers at 1000 instead of one, how can I do this to an existing table?

    Thanks
     
    Kain, Sep 4, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    ALTER my_table AUTO_INCREMENT = new_number;

    You must have alter privileges to so this.
     
    jestep, Sep 4, 2008 IP