Skip to main content

Select duplicated records in a table and match with another table

SELECT ID,NAME,COUNT(*) FROM TABLE_NAME WHERE ID IN ( SELECT ID_2 FROM TABLE_NAME) GROUP BY ID,NAME HAVING COUNT(*) >1;

Comments