Find duplicate column value in sqlite

Solution 1:

SELECT DataId, COUNT(*) c FROM DataTab GROUP BY DataId HAVING c > 1;

Solution 2:

I have used it in my application. It is working based on your query

SELECT a.* 
FROM CENTERDETAILS a 
JOIN 
(SELECT IPADDR, MACID, COUNT(*) 
    FROM CENTERDETAILS  
    GROUP BY IPADDR, MACID 
    HAVING count(*) > 1
) b ON a.IPADDR = b.IPADDR OR a.MACID = b.mac 
ORDER BY a.MACID