You could use a select statement like the following, to find out what employees exist more than once:
select emp_id, count(*)
from employee
group by emp_id
having count(*) > 1;
If you want to count the duplicate employees, you could do something like:
select count(*) from (
select emp_id, count(*)
from employee
group by emp_id
having count(*) > 1);
Here I’m assuming that an emp_id is the field used to identify an employee, but you can replace it but other field(s) as needed.
Discuss This Question: 1  Reply