求MYSQL中某字段内的重复数据,其中ziduan是表table中的字段,具体请自行替换

select ziduan,count(ziduan) from table group by ziduan having count(ziduan)>1

比如 user_name在user_table 中重复

select user_name,count(*) as count from user_table group by user_name having count>1;

Comments are closed.

Post Navigation