How to finding Duplicate records(Rows)based on Multiple Columns.

Suppose table name is tab_employee_dat and table contains columns like emp_id,emp_name,emp_phone,emp_address,emp_email_id …..  .

We want to find duplicate records based on emp_phone and emp_email_id.

You can try below query

select emp_id,emp_name,emp_phone,emp_email_id,count(*) from tab_employee_dat  group by emp_phone,emp_email_id having count(*)>1

 

 

Leave a comment