Chinaunix首页 | 论坛 | 博客
  • 博客访问: 131904
  • 博文数量: 37
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 375
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-13 17:31
文章分类

全部博文(37)

文章存档

2011年(1)

2010年(9)

2009年(27)

我的朋友

分类: 数据库开发技术

2009-10-29 13:22:59

1、创建临时表来存储有duplicate rows的记录
Create table dupeddata as(
Sel * from table group by having count(*) > 1
) with data;
2、删除原表中的duplicate rows的记录
Delete from table
Where in
( sel * from dupeddata );
3、把临时表中的记录插入到原表中。
Insert into table
Sel * from dupeddata;
4、删除临时表
Drop table dupeddata;
阅读(648) | 评论(0) | 转发(0) |
0

上一篇:Identity Column

下一篇:DIAGNOSTIC资料

给主人留下些什么吧!~~