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 deallocate cursor and close cursor?
When we should use @@error?
what are user defined datatypes? : Sql server database administration
How to get a list of columns in a view using the "sp_columns" stored procedure?
Does sql server use t sql?
Explain view in sql server?
How to connect sql server management studio express to sql server 2005 express?
What is tablesample?
Write a code to select distinct records without using the DISTINCT keyword.
which table keeps the locking information? : Sql server administration
what's the difference between a primary key and a unique key? : Sql server database administration
what is unique and xaml nonclustered index
Does an index slow down updates on indexed columns?
What is a livelock?
What does the on update no action do?