标签:
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;
标签:
原文地址:http://www.cnblogs.com/chucklu/p/5497367.html