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 |
how to find the 2nd higgest salary in the column for example take table name is employee? And also find bottom 2nd lowest salary ?
11 Answers GeoTechnology, Wipro,
Explain difference between state server and sqlserver? : .NET Architecture
what is a namespace?how they are classified?write a program which contains class,object,inheritance?
How to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile
Explain .net mobile events? : Microsoft dot net mobile
server.transfer limitation ?
how u maintain data while navigating one page to another?
Wcf- What is ABC
What is the use of TPL DATAFLOW?
What re interop services?
What is the access level of the visibility type internal?
What is a clickonce application?