`
newlethe
  • 浏览: 81575 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

删除数据库表中重复的数据

阅读更多
--用过滤好的数据创建临时表
create table temp_emp as (select distinct * from table_007) ;
--删除原来的表中所有数据
truncate table table_007; 
--将临时表中数据插入到原来的表
insert into table_007 select * from temp_emp; 
--删除临时表
drop table temp_emp; 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics