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

can any one urls for learning .net(which is written in simple english)

1 Answers  


how can we achieve language interoperability through CLS? How MSIL works?

0 Answers   EDS,


Explain 'managed' mean in the .NET context

0 Answers   HCL,


Define a managed code? : Dot net architecture

0 Answers  


Explain about validation?

0 Answers  






which would be the best to use inproc,outproc or sql server

2 Answers   Ness Technologies,


HI THIS IS THIRUMAL. I AM COMPLETED MY MCA IN 2009 WITH 64%. NOW I AM LOOKING FOR A JOB(FRESHER)IN HYDERABAD.PLEASE IF YOU FIND ANY OPENINGS IN ANY COMPANY SEND IT TO MY MAIL ID PLEASE.. SKILL SET : C,C++,C#.NET,ASP.NET,ADO.NET,SQL SERVER, SSIS,SSRS EMAIL ID : THIRU104@GMAIL.COM THANKS & REGARDS D.THIRUMAL

1 Answers  


What is the use of TPL DATAFLOW?

0 Answers   MCN Solutions,


Name some changes done since version 3.0?

0 Answers  


Do you know textbox and textview controls of .net mobile? : Microsoft dot net mobile

0 Answers  


Describe the advantages of writing a managed code application instead of unmanaged one. What is involved in certain piece of code being managed?

0 Answers  


What is boxing and unboxing? Does it occure automaatically or you need to write code to box and unbox?

0 Answers  


Categories