How to delete the duplicate records in a table using sql
server
Answers were Sorted based on User's Feedback
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 |
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 |
What i sthe meaning of .(dot) in .Net?
which would be the best to use inproc,outproc or sql server
Can you explain server controls in atlas?
What is this DLL hell problem in dotnet? Can a virtual class be created/can a virtual method be created inside the class?
How to upload in video,mp4,in .net 4.5 ..?
How does .net mobile work? : Microsoft dot net mobile
What is the difference between abstract class and Interface? Give an example how will u write an abstract class using .NET Framework
how to change row background color in gridview
Explain a .net mobile example with details? : Microsoft dot net mobile
6. Wcf- what is SOA
Define cache? : Dot net architecture
Explain hard disk and what is its purpose? : .NET Architecture