删除mysql数据库中的重复数据记录

mysql中select distinct * from text不能显示不重复的记录,而是直接全部显示
采用的是下面的方法可删除,假设重复的是test数据库中的title字段
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;

引用通告地址: 点击获取引用地址
评论: 1 | 引用: 0 | 阅读: 1485
ugg clearance [ 2011-10-05 09:58 网址 | 回复 | 编辑 删除 ]
One of the best resources for ugg boots clearance sale is the division store large Nordstrom. Due to the fact Nordstrom originally commenced as a shoe store, it is absolutely ideal that Nordstrom carries 1 of the largest selections of ugg footwear in the region.
  • 1 
发表评论
昵 称: 密 码:
网 址: 邮 箱:
选 项:    
头 像:
内 容: