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
Which event (check constraints, foreign key, rule, trigger, primary key check) will be performed last for an integrity check?
Explain primary key?
How to bind a view to the schema of the underlying tables?
What is snapshot replication?
How to find table changes in sql server?
What is difference between views and tables?
What is raid, and how it can influence database performance?
Why olap is used?
what is the sql equivaent of the dataset relation object ?
How does using a separate hard drive for several database objects improves performance right away?
application server is slow what may be the problem
How you can get a list of all the table constraints in a database?
What are the different types of indexes?
How to see the event list of an existing trigger using sys.trigger_events?
Can group by be used without aggregate functions?