根据一个字段查询是否有重复 select * from table_name where idcard in (select idcard from table_name group by idcard having count(idcard) > 1) 根据两个字段判断是否有重复 select * from table_name group by user_id,createtime having count(*) > 1 ORDER BY user_id asc