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
Can a table contain multiple foreign key’s?
How do you explain an index number?
What are the types of variables use in pl sql?
How to execute a stored procedure?
How do you go back in sql?
what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba
What is a table in a database?
Where is pl sql used?
What is right join in sql?
What is cte?
What does truncate mean in sql?
What is a variable in sql?
How does cross join work in sql?
In a distributed database system, can we execute two queries simultaneously?
Explain 3 basic parts of a trigger.