Delete duplicate rows from a table without primary key by
using a single query
Table Employee
empname salary
A 200
B 300
A 200
C 400
D 500
D 500
Output should be
A 200
B 300
C 400
D 500
Answer Posted / b.v.rajaram
delete top (select count(*)-(select count(distinct empname )
from Employee) from Employee)from Employee
where a in (select distinct a from Employee)
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is acid mean in sql server?
What do you do in data exploration
how many type of indexing in database?
Explain about remote stored procedure?
What is difference between index and primary key?
How do you size a resultset?
New concepts of sql server 2005 use in your project.
How to trouble shoot if unable to connect SQL Server
How many categories of data types used by sql server?
Explain boyce and codd normal form(bcnf)?
What is best institute to Learn DotNET And SQL in chennai?
What are synonyms?
What is #table in sql server?
Do you know concepts and capabilities of sql server?
What is nonclustered index on computed columns?