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 the features and advantages of object-oriented programming? : Sql dba
what is the difference between primary key and unique key? : Sql dba
Is nosql faster than sql?
How do I send sql query results to excel?
what are the authentication modes in sql server? How can it be changed? : Sql dba
Is truncate ddl or dml?
How many disk partitions should I have?
Does sql full backup truncate logs?
How do you modify a column in sql?
What is natural join in sql?
Which query operators in sql is used for pattern matching?
What is the difference between delete and truncate statement in sql?
Explain isolation levels. : Transact sql
What are local and global Indexes and where they are useful.
What are the possible values for the boolean data field?