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

Do you know what is similarity and difference between truncate and delete in sql?

568


Explain the difference between HTTP and HTTPS in database?

555


What happens if null values are involved in arithmetic operations?

576


query processing

1731


How can you append an identity column to a temporary table?

443






What is nonclustered index on computed columns?

566


How does the report manager work in SSRS?

114


Tell me what is de-normalization and what are some of the examples of it?

559


Explain about service Broker functions?

606


How does clustered and non clustered index work?

509


How do I find information about the install locations for the various instances running on a computer?

545


How to rebuild indexes with alter index ... Rebuild?

582


What are the export options of ssrs?

124


Do you know the cursor types?

612


What happens if null values are involved in bitwise operations?

595