Write a query to delete duplicate records in SQL SERVER
Answer Posted / sujit kumar suman,new delhi
DELETE DUPLICATE RECORDS FROM TABLE IN SQL SERVER:
DELETE FROM TABLE1
WHERE
ID NOT IN
(SELECT MAX(ID) FROM TABLE1
GROUP BY NAME)
WHERE ID IS IDENTITY FIELD AND NAME IS DUPLICATE FIELD
TRY THIS QUERRY AND ENJOY.......
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Why use “in” clause in sql server?
What are the functions in sql server?
What is isnull() operator?
What are the advantages of using a stored procedure?
explain the difference between oracle- sql and sql server sql ? if both are same y we r using 2 sw.s?
Find columns used in stored procedure?
What is shrink log file?
Explain logical operators in sql server?
what is the main function of a query parameter?
How to write a query with a full outer join in ms sql server?
what are the critical issues you have resloved in your company
Is truncate autocommit?
What happens if we shrink log file in sql server?
How to call a function from a stored procedure in SQL Server ?
What is the default schema of your login session in ms sql server?