How to retrieve Duplicate Rows only in a Table?
Suppose if a Table Name is "Education". It consists of
multiple columns. Then if we insert rows into this table
with duplicate records then how can we retrieve only
duplicate records from that table?
Answer Posted / lakshmi narayana
select * from emp a ,
(select empno,count(*) from emp group by empno having count
(*) > 1) b
where a.empno = b.empno
| Is This Answer Correct ? | 27 Yes | 10 No |
Post New Answer View All Answers
Why do we need sharding?
What company owns postgresql?
Which command is used to delete a trigger?
What is parameter substitution in sql?
how to concatenate two character strings? : Sql dba
What is the difference between alter trigger and drop trigger statements?
can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba
How to run sql statements through the web interface?
Does truncate need commit?
Why stored procedure is faster than query?
Why does sql need a server?
How does left join work in sql?
How many row comparison operators are used while working with a subquery?
How many scalar data types are supported in pl/sql?
What is a pl/sql block?