Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2008
    Posts
    2

    Unhappy Unanswered: deleting 4th row in a table

    hi
    can any body tell me how to delete 4th row in a table consisting of 4 records which are exactly same

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    if the table has only 4 rows in it, and they are all "exactly same," then i would just drop the table and recreate it...

    ... only this time, i'd use a primary key

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    select top 3 * into newtable from oldtable

    drop old_table

    rename newtable to oldtable

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    how do we know which one is the fourth? hmmmmmmm.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    Sep 2005
    Posts
    161
    Quote Originally Posted by Thrasymachus
    how do we know which one is the fourth? hmmmmmmm.
    I say there is no fourth row.

Posting Permissions

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