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 is the application frame host?
Explain the five stages in a dlx pipeline? : Dot net architecture
Explain the number or character entered through keyboard gets converted to equivalent ascii code & it get stored on ram in the binary form. What is the exact procedure on hardware that converts the ascii value to binary? : .NET Architecture
how can u manage sessions ?
What is the difference between custom controls and master page?
What is this DLL hell problem in dotnet? Can a virtual class be created/can a virtual method be created inside the class?
What is a managed code is dim fs as filestreamobject is a managed code? : .NET Architecture
How will you do windows authentication and what is the namespace?
What is CLR,MSIL and Jit Compiler and their roll in .net
Explain some of the disadvantages due to microsoft.net?
define cache memory? : Dot net architecture
Explain how cache is used? : Dot net architecture