How to delete the duplicate records in a table using sql
server

Answers were Sorted based on User's Feedback



How to delete the duplicate records in a table using sql server..

Answer / mohamed idhris

SET ROWCOUNT 1

DELETE FROM tbl_name WHERE field_name= 'field_value'

SET ROWCOUNT 0


the above query will delete the duplicate row

Is This Answer Correct ?    4 Yes 2 No

How to delete the duplicate records in a table using sql server..

Answer / rakesh pattajoshi

delete from tbl where id not in(select max(id) from tbl group by name)

Is This Answer Correct ?    0 Yes 0 No

How to delete the duplicate records in a table using sql server..

Answer / priya

use distinct.it removes the duplicate rows

Is This Answer Correct ?    0 Yes 0 No

How to delete the duplicate records in a table using sql server..

Answer / ranjitha

Add Primary Key to the table.

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More Dot Net AllOther Interview Questions

What is the use of delegates

2 Answers  


How to improve the cache performance? : Dot net architecture

0 Answers  


What is a virtual memory? : .NET Architecture

0 Answers  


Can I customise the trace output?

0 Answers  


How many types of assemblies are there in the visual studio.net?

1 Answers   Six Sigma,






What is static Constructor?

4 Answers   iGate,


Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?

2 Answers  


how to create applications by using Visual Studio 2012?

0 Answers   TryTechnicals Pvt Ltd,


define cache memory? : Dot net architecture

0 Answers  


What is the difference between absolute expiration and sliding-time expiration?

0 Answers   MindCracker,


how to delete the record using data reader

0 Answers   PCS,


What is the difference between l1 and l2 cache? : Dot net architecture

0 Answers  


Categories