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 Video Streaming in .net??

0 Answers   Infosys,


what are the things we generally declare in session_start , application_start ?

2 Answers  


What is the difference between custom controls and master page?

1 Answers   Tesco,


What is textview control of .net mobile? : Microsoft dot net mobile

0 Answers  


Session State and can i store desirialized object in state server, if yes how and if not why.

0 Answers   PCS,


i wish to write mcts(microsoft certified technology specialist) exam. can anyone give the model question or format and preparation method?

0 Answers  


what are constructors and destructors?

0 Answers   Six Sigma,


Explain the Lapsed Listener problem in .net

0 Answers   HCL,


How to prevent my .NET DLL to be decompiled?

0 Answers   CDC,


What is cookie less session?

0 Answers  


Tell me .net mobile emulators? : Microsoft dot net mobile

0 Answers  


What is an asssembly qualified name? Is it a filename? How is it different?

0 Answers  


Categories