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 events for a form?
How to call .NET Web service from Java Appl. & Why ?
Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?
What is a managed code is dim fs as filestreamobject is a managed code? : .NET Architecture
Difference between throw exception and rethrowing ?
.net platform independent or dependent?
What re interop services?
What is this DLL hell problem in dotnet? Can a virtual class be created/can a virtual method be created inside the class?
How can we perform data binding in atlas?
6. Wcf- what is SOA
Whate are resource files? How are they used in .net?
How do I write to the application configuration file at runtime?