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 string functions in sql?
Can we use delete in merge statement?
Explain what is a database?
How can you create an empty table from an existing table?
What is mutating trigger?
tell us something about heap tables. : Sql dba
Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?
Which software is used for pl sql programming?
Explain scalar functions in sql?
What does seeding a database mean?
How do I view a view in sql?
What are analytical functions in sql?
What is rowid in sql?
what is 'mysqlshow'? : Sql dba
How can you fetch common records from two tables?