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 / gaurav sharma
SELECT DISTINCT * INTO Employee1 FROM Employee
DROP Table Employee
sp_rename 'Employee1','Employee'
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Relational calculus is what type of language?
Do you know what are the steps to process a single select statement?
Why we need sql server?
In what version of sql server were synonyms released?
what are database files and filegroups? : Sql server database administration
It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio
What do you mean by stored techniques? How would we use it?
How can change procedure in sql server?
What is data source in connection string?
Do you know what is replace and stuff function in sql server?
What is trigger explain with program?
What is the difference between nvl and nvl2?
What is wide table?
What is buffer cash and log cache in sql server?
How do I install sql server?