mysql中select distinct * from text不能显示不重复的记录,而是直接全部显示
采用的是下面的方法可删除,假设重复的是test数据库中的title字段文章源自很文博客https://www.hinwi.com/很文博客-https://www.hinwi.com/60132.html
- create table bak as (select * from test group by title having count(*)=1);
- insert into bak (select * from test group by title having count(*)>1);
- truncate table test;
- insert into test select * from bak;
文章源自很文博客https://www.hinwi.com/很文博客-https://www.hinwi.com/60132.html 文章源自很文博客https://www.hinwi.com/很文博客-https://www.hinwi.com/60132.html
我的微信
微信号已复制
扫一扫更精彩
大家的支持是我更新的动力!!!