#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Delhi , INDIA
    Posts
    23
    Rep Power
    0

    resetting an autoincrement field


    Does anybody have an idea of how to reset an autoincrement field in a mysql table. I mean suppose i have 20 records..So that new records get 21 as autoincrement value.Now I delete first 10 records.Is there any way that the remaining records adjust so that new records go at 11 instead of 21.
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Look at DBCC CHECKIDENT in books online
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Delhi , INDIA
    Posts
    23
    Rep Power
    0
    What does books online refer to? Pls suggest where to look DBCC CHECKIDENT for?

IMN logo majestic logo threadwatch logo seochat tools logo