how to delete duplicate records in sql server
  • hi how can i delete duplication from my sql server table.

    suppose i have data like

    ProductId  Qty  Price
    5                10     125
    5                10     125
    6                20      250 
  • 2 Comments sorted by
  • just try this one Mr.Ravi
    DELETE FROM member
    FROM (SELECT id FROM member
    GROUP BY member_id, quiz_num, question_num, answer_num HAVING (COUNT(*) > 1)
    ) AS A
  • DELETE FROM table_name  
    where column_name in(
        SELECT  column_name 
            FROM (
                    select column_name 
                    FROM table_name
                    GROUP BY column_A, column_B, column_C, ... 
                    having COUNT(*)>1)temp

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook


Popular Posts of the Week