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 / navneet sharma

select distinct * from tablename

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is row_number function?

595


Tell me what is the stuff and how does it differ from the replace function?

543


How to drop an existing user defined function in ms sql server?

571


what are the core components of SSRS?

92


Is sql server difficult to learn?

528






What is report server project?

106


What is difference between after and before?

509


How to get the number of affected rows?

566


Can a database be shrunk to 0 bytes, if not, why?

642


Explain activity monitors

626


How can you insert null values in a column while inserting the data?

722


Is mysql the same as sql server?

515


How to list all tables in the database using odbc_tables()?

572


Can two tables share the same primary key?

513


how to do partition in sqlserver

1977