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 are the main Tools to develop .Net Application?
Difference between throw exception and rethrowing ?
What actually happes when you add a something to arraylistcollection ?
Which tool you will use to deploy a windows service
How does .net remoting work?
How does an appdomain get created?
Is dim fs as filestreamobject is a managed code? : Dot net architecture
how can u manage sessions ?
Explain different pipelining hazards and how are they eliminated? : Dot net architecture
Explain the difference between inprocess vs out process session state : Dot net architecture
what is ado.net
Explain cache? : .NET Architecture