查找数据库重复的值及去重复操作

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Webben/article/details/81165560

Mysql查询某字段值重复的数据

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

去重复

creat table temp as select max(id) as id,a1,a2 from a group by a1,a2

猜你喜欢

转载自blog.csdn.net/Webben/article/details/81165560