SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member chowphany's Avatar
    Join Date
    Feb 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Rearranging records in ascending format after deletion

    Hi to every one..!

    I want to rearrange records in ascending order after deletion of any in the database based upon the primary key.

    i.e.,

    if any records deleted in between others the id's are automatically rearrange in ascending order..!.

    ThanX.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    one word: don't

    just leave the primary keys the way they are, with gaps

    the actual values do not matter, and if you think they do matter, then there is something in your design which is problematic
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •