这里假如我们要检查一张game表的字段如gid是否有重复:
SELECT COUNT(gid) as count_gid FROM game WHERE del=0 GROUP BY gid HAVING count_gid>=2
这里假如我们要检查一张game表的字段如gid是否有重复:
SELECT COUNT(gid) as count_gid FROM game WHERE del=0 GROUP BY gid HAVING count_gid>=2
转载于:https://www.cnblogs.com/alonely/p/9798936.html