--查找表里重复记录; select * from client where id in(select id from client group by id having count(id)>2) --查找出哪个id重复了记录; select id from client group by id having count(*)>1 --使用group by清除重复的,不使用distinct