Mysql查询某字段重复的数据
例如:查询user表中,姓名出现次数在一次以上的数据
select username ‘用户名‘,count(*) as counts from `user`
GROUP BY username HAVING counts > 1;
2021-11-18 03:49:32
例如:查询user表中,姓名出现次数在一次以上的数据
select username ‘用户名‘,count(*) as counts from `user`
GROUP BY username HAVING counts > 1;