How to delete repeated entries from table using T-SQL statement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dhakate123
    New Member
    • Oct 2006
    • 2

    How to delete repeated entries from table using T-SQL statement

    Hi Friends..



    I want delete repeated entries which comes twice in a table. How to delete that extra entry and keep each single entry using T-SQL statement(SQL server 2000). Please give me the example.

    Thanks & Regards,
    Ravi.
  • Alfred
    New Member
    • Oct 2006
    • 7

    #2
    Hi,

    You may select distinct the duplicate entry and save it in a temporary table, then delete the double entry to the main table and insert the content of the temporary table to the main table.

    Comment

    • dhakate123
      New Member
      • Oct 2006
      • 2

      #3
      Hi,


      Thank you for giving solution, but still I don't know how to do that, can you send me code and e.g. It will help me for understanding. I hope you will give this solution very soon.


      Thanks & Regards,
      Ravi.

      Comment

      Working...