This question was asked for an interview, I still cant find an answer by googling it.
I have a table with two columns. Table doesn't have any primary key. I want to delete the duplicate rows. I can do it by alter table but they want a delete query.
Here is the table data.
empid name
1 rahul
2 rajeev
1 rahul
2 rajeev
2 rajeev
3 elias
4 amith
2 rajeev
The result should be be
1 rahul
2 rajeev
3 elias
4 amith