How to retrieve duplicate rows in a table?
How to delete the duplicate entries in a table?
Answer Posted / madhur/amrutha
Consider a table emp with employee details. The Correct
code to retrieve duplicate rows :
select distinct * from emp where names in
(select names from emp group by names having count(sal)>1)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the difference between functions and stored procedures?
In which sql server version report builder introduced?
Do you know the different ddl commands in sql?
Do you know what is replace and stuff function in sql server?
How to download microsoft sql server 2005 express edition?
Do comments need to go in a special place in sql server 2005?
What are the transaction properties?
Tell me extended events in sql server 2008?
What is an identity?
What command do we use to rename a database?
What are the joins in sql server? : sql server database administration
Do you know how to store and query spatial data?
What is change data capture (cdc) feature?
Detail about the hardware which is supported by SQL server?
What are the database objects? : SQL Server Architecture