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

how to use custom field validation

0 Answers   PCS, Prithvi,


How cache is used? : Dot net architecture

0 Answers  


What is .net mobile forms? : Microsoft dot net mobile

0 Answers  


what are ACID properties ?

3 Answers  


When do I need to use gc.keepalive?

0 Answers  






what are constructors and destructors

1 Answers   Six Sigma,


What does the term "green architecture" mean? : .NET Architecture

0 Answers  


What are the major differences between services and web services?

0 Answers  


Explain the race around condition? How can it be overcome? : Dot net architecture

0 Answers  


What is MS chart control in visual studio?

0 Answers  


how can u manage sessions ?

3 Answers   Ness Technologies,


i want to know that now a days which software course has demand and more opportunities please give me reply to my mail id

3 Answers   APC,


Categories