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 / v.krishnakumar
using the keyword distinct we can avoid the duplicate value
in our table,(ex) SELECT DISTINCT empname FROM Employee
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is database mirroring?
Difference between 2NF &3NF ?
What do you mean by data integrity?
What is bit data type?
what is a correlated sub-query? : Sql server database administration
what is dbcc? : Sql server database administration
What are relationships and mention different types of relationships in the dbms
when would you go for denormalization? : Sql server database administration
Explain about Views?
What is difference between materialized view and view?
Can sql servers link to other servers?
Are all views updatable ?
How to create a dml trigger using create trigger statements?
What are the features of Embedded SQL
What is the difference between dbcc indexdefrag and dbcc reindex?