Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2006
    Posts
    10

    Unanswered: Truncate some of a table - Reset ID autoinc

    I am uploading (refreshing) a data file to a table once a week.
    I used TRUNCATE rather than LOAD REPLACE because it is supposed to reset the autoincrementer ID.

    As it certainly doesn't reset it (now in the billions!) is there a command to reset the ID that I can put in as a query?

  2. #2
    Join Date
    Jul 2004
    Location
    Dundee, Scotland
    Posts
    107
    "ALTER TABLE table_name AUTO_INCREMENT = 100;"

  3. #3
    Join Date
    Jul 2006
    Posts
    10

    Doesn't!!

    I've tried this to no effect in a mysql query. Thanks, though!
    I must contact my hoster to see why! I presume it should simply change that field throughout the table. Or does something else have to happen first do you think?

Posting Permissions

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