首页 > 数据库技术 > 详细

Oracle快速复制表

时间:2018-12-27 12:56:57      阅读:308      评论:0      收藏:0      [点我收藏+]
清空表 

oracle --truncate truncate table gh_qytc_ls; //从一个表插入到另外一个表 insert into gh_qytc_ls SELECT * FROM gh_qytc tc; 快速copy一张表数据到另外一张表 1、创建一个临时表,字段和要用的表相同 create table gh_qyghgx_temp as select * from gh_qyghgx where qybm=‘F227‘; 2、查询临时表是否创建成功 select * from gh_qyghgx_temp; 3、删除临时表的那条记录 truncate table gh_qyghgx_temp; 4、把要备份的表的数据放入临时表 insert into gh_qyghgx_temp select * from gh_qyghgx 5、查询是否插入成功 select count(*) from gh_qyghgx_temp;

 

Oracle快速复制表

原文:https://www.cnblogs.com/yongguang1990/p/10184147.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!