Results 1 to 6 of 6

Thread: Autonumber

  1. #1
    Join Date
    Sep 2005
    Posts
    12

    Unanswered: Autonumber

    I created a table with a field (autonumber) for each record. Could someone tell me how to re-initialize the index to 1 when deleting all the records.

    Thanks
    acheo

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    compact your database
    Inspiration Through Fermentation

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    3 threads with the exact question in two days...
    Not bad going, eh!

    I ask the question again - WHY do you feel the NEED to reset your autonumbers?

    George
    Home | Blog

  4. #4
    Join Date
    Dec 2005
    Posts
    266
    the autonumber will get one day 1000000000 , i am having a datagrid and i need a "normal" autonumber
    why dont you see the need georgev?
    Last edited by anselme; 02-17-07 at 14:02.

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    compact your database
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Lol r937.

    And anselme - if you want to have a "normal" number then you shouldn't be using autonumbers as your reference. Autonumbers are mainly used as a primary key - not a referencing key. Perhaps you need to rethink your table strucure if you want a number to stay "normal" ^_^
    George
    Home | Blog

Posting Permissions

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