1.SqlServer数据库 --DataTable 原数据表 --DataTable_20150717 要备份的新表名 select * into DataTable_20150717 from DataTable Where [条件1,条件2]; 2.Oracle数据库 --创建表结构 create table Table_20150720 ; --备份指定数据 insert into Table_20150720 select * from Table Where [条件1,条件2]…
方法一: 只复制表结构: create table table_name_new as select * from table_name_old where 1=2; 然后: alter session enable parallel dml; insert /*+ parallel(t,10) */ into table_name_new t as select * from bb; 方法二: 复制表数据:CREATE TABLE aa PARALLEL(DEGREE 10) NOLOGGIN…
[Oracle]快速构造大量数据的方法: create table tab001(id integer primary key, val varchar2(100)); insert into tab001 select i+j,rpad(to_char(i+j),100,'A') from ( with DATA2(j) as ( select 0 j from DUAL …
一:根据user表创建user_backup表 drop table if exists user_backup; create table user_backup like user; // like方式:根据user表的结构,来创建user_backup,那么user_backup表就有了和user表相同的结构 // insert into... select 将查询出的数据,插入到备份表insert into user_backup select * from user;…