摘要: solution 1 create table newtable as select distinct * from oldtable; drop table oldtable; rename table newtable to oldtable; solution 2 create table newtable as select distinct * from oldtable; trun... 阅读全文
posted @ 2016-03-27 17:45 全威儒 阅读(797) 评论(0) 推荐(0)
摘要: 【IT168 评论】在很多时候,我们会需要对一个表进行插入大量的数据,并且希望在尽可能短的时间内完成该工作,这里,和大家分享下我平时在做大量数据insert的一些经验。 前提:在做insert数据之前,如果是非生产环境,请将表的索引和约束去掉,待insert完成后再建索引和约束。 insert into tab1 select * from tab2; commit; 这是最基础的ins... 阅读全文
posted @ 2016-03-27 14:45 全威儒 阅读(13235) 评论(0) 推荐(1)