SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Update the AUTO_INCREMENT value of a table

    Hello,
    I have a table with an AUTO_INCREMENT primary key. I want to know if I want to for example, let say the next AUTO_INCREMENT value of that table is 523, but I want it to be 601... is there a way to update that with a query?

    Thanks!
    Guillermo

  2. #2
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind... I fount it

    ALTER TABLE tbl_name AUTO_INCREMENT = 100
    Guillermo

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2004
    Location
    Ontario, Canada
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That can be done in phpMyAdmin as well, under Options I believe.
    Brock Ferguson
    Lead Developer, Caribou CMS
    A Subscription/Membership CMS and Ecommerce Platform - FREE Trial


Bookmarks

Posting Permissions

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