select * from myTable t1 ; where exists (select * from myTable t2 ; where t1.Company_id = t2.ParentColId and t1.ParentColId = t2.Company_Id)