Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005

    Unanswered: reset autonumber fields

    How can I reset autonumber fields after i have emtied a table, so I can start with a clean database after testing it.

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    instead of deleting rows, use truncate tablename, this resets the auto_increment | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2006

    Autonumber Reset

    ALTER TABLE `database_name`.`table_name` AUTO_INCREMENT = ##;

    This will allow you to reset the starting point on your autoincrement. I had it set to auto, but a php page I made had somehow set it to 8000. So sometimes it is beneficial to be able to reset things back down to where they are logical.

Posting Permissions

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