Results 1 to 3 of 3

Thread: Reseting an auto_increment field

  1. #1
    Join Date
    Jan 2006
    Posts
    3

    Reseting an auto_increment field

    hello
    I have a column set to auto_increment and have been adding some test rows. Later on I deleted them all and expected the value auto incremented to start from 0 but it didnt, now my first row is IDed 19. How can I fix this so when I empty the table the auto_increment field is also reset?
    thanks for your time

    edit:I use phpMyAdmin

  2. #2
    Join Date
    Dec 2005
    Posts
    4
    No. If you have an empty table you should just recreate it, else delete and create again this field (IMHO).

  3. #3
    Join Date
    Jan 2006
    Posts
    1
    I use the following:

    Code:
    ALTER TABLE tablename auto_increment = 0;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •