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 is scalar function?
What is a scalar value in sql?
What is the main reason behind using an index?
Is a foreign key always unique?
Is grant a ddl statement?
What are different types of queries in sql?
What is substitution variable?
What is sql and explain its components?
Is and as keyword in pl sql?
what are null values? : Sql dba
what is a unique key ? : Sql dba
What do you understand by pl/sql packages?
what are sequences
What is a sql*loader control file?
How will you distinguish a global variable with a local variable in pl/sql?