Oracle快速復制表


清空表 

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;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM