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
How to add an address record into adventureworkslt?
Can we use custom code in ssrs?
What are the different types of locks in the database?
Is it possible for a stored procedure to call itself or recursive stored procedure?
What is the difference between grant and with grant while giving permissions to the user?
How to grant a permission in ms sql server using "grant execute" statements?
What is log shipping? Can we do logshipping with SQL Server 7.0 ?
Where actually sql azure database is hosted?
What are different types of join?
Do you know what are acid properties of transaction?
What the difference between UNION and UNIONALL?
What is merge join?
Is null vs coalesce?
what is the difference between Delete and Truncate command in SQL
Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication