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 / smita
select a.empno, a.empname from education a,
(select empno, count(*) cnt from education group by empno
having count(*) > 1) b
where a.empno = b.empno
is the correct answer
| Is This Answer Correct ? | 12 Yes | 5 No |
Post New Answer View All Answers
What are all the different normalizations?
What is pl sql variable?
How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000
Can we join more than 2 tables in sql?
How does left join work in sql?
what is foreign key? : Sql dba
What is a function in oracle pl sql?
Explain the difference between rename and alias?
What is the command used to fetch the first 5 characters of a string?
Inline the values in PL/SQL, what does it mean.?
What is coalesce in sql?
How do I create a memory optimized filegroup?
What is cursor in pl sql with examples?
What is trigger in sql and its types?
what is the use of double ampersand (&&) in sql queries?