Results 1 to 2 of 2

Thread: reorder an sql table

  1. #1
    Join Date
    Feb 2006

    reorder an sql table

    i have an sql table with an auto incrementing id field, they may site works is that it needs the numbers to be consecutive and if an entry is deleted it will break this. is there an sql/php way to reorder the numbers to be consecutive again?

    e.g. 1,2,3,4,5,6,7,8,9,10

    4,5 deleted


    cheers for any help

  2. #2
    Join Date
    Aug 2005
    The Garden State
    Why would you need to do that? Can you explain the logic that says you need to have consecutive numbers, as that's not how it should be with any application.
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles