从数据表中筛选重复的数据

If you want to find duplicate data (by one or several criterias) and select the actualrows.

This should also work, maybe give it try. SELECT id, COUNT(id) FROM table1 GROUP BY id HAVING COUNT(id)>1;

I think this will work properly to search repeated values in a particular column.

SELECT gid_Sensorinfo, COUNT(gid_Sensorinfo)
FROM rel_testareasensor 
GROUP BY gid_Sensorinfo 
HAVING COUNT(gid_Sensorinfo)>1;

 

你可能感兴趣的:(从数据表中筛选重复的数据)