原文:https://blog.csdn.net/luyaran/article/details/80929026
-------------单列-----------------------
SELECT
检查字段,
COUNT(检查字段)
FROM
table_name
GROUP BY 检查字段
HAVING COUNT(检查字段) > 1
-------------多列------------------
SELECT
检查字段1, COUNT(检查字段1),
检查字段2, COUNT(检查字段2),
...
FROM
table_name
GROUP BY
检查字段1,
检查字段2, ...
HAVING
(COUNT(检查字段1) > 1) AND
(COUNT(检查字段2) > 1) AND