-
How to display duplicate rows in a table?
select * from emp where deptno=any(select deptno from emp having count(deptno)>1 group by deptno);
-
SQL Query to return only duplicate rows and count
I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated?