Results 1 to 2 of 2

Thread: duplicate rows

  1. #1
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401

    Unanswered: duplicate rows

    What is the best way to remove duplicate rows from a table ?

  2. #2
    Join Date
    Sep 2003
    Location
    Dallas, Texas
    Posts
    311

    Re: duplicate rows

    There were a couple of ways that I have tried worked. The first one is to use 'set rowcount 1' then delete the row with count(*) > 1. The second works better for large tables. Insert into TempTable select distinct * from RealTable. Delete all row with count(*) > 1, and then insert the temp table rows back to the real table.

    Hope this helps. Good luck!

Posting Permissions

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