Results 1 to 4 of 4

Thread: Deleting rows

  1. #1
    Join Date
    Jul 2009
    Posts
    2

    Post Unanswered: Deleting rows

    How we can delete the duplicate rows compare with 2 columns.

    ex
    i have
    id num num1
    1 1 5

    2 3 6

    3 3 7

    1 1 8



    so we got a duplicate combination (1,1)
    we i need to remove the last row
    so can u tell me how can i do this


    thank u
    sreenivas

  2. #2
    Join Date
    Feb 2009
    Posts
    62
    Given that, unless you have a column to order by, there is no concept of first and last in a relational database, which of the rows (1,1,5) and (1,1,8) do you want to delete?

  3. #3
    Join Date
    Jul 2009
    Posts
    2
    here we got a duplicate combination 1,1 the two colums
    so we have to delete the second one i.e(1,1,8)

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Rows in a table are like balls in a basket.
    Rows in a table have NO inherent order; there is no first, second, etc.

    >so we have to delete the second one
    Which is second red ball in basket?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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