SELECT distinct A.ID,A.NAME FROM EMP A,EMP B WHERE A.NAME = B.NAME AND A.ID <> B.ID;