Display the all employee details whose having duplicate salary

We are retrieve the records from emp table.

Select * from emp 
where sal in (select sal from emp group by sal having count(*)>1) 

or

Select * from emp 
where (sal,deptno) in (select sal,deptno from emp group by sal,deptno having count(*)>1) 

output on tool

Display the all employee details whose having duplicate salary

Leave a Reply