创建测试表和测试数据 create table test (id number,name varchar(10)); insert into test values(1,'liufang'); insert into test values(2,'xiaozhang'); insert into test values(3,'dawei'); insert into test values(4,'laotan'); insert into test values(5,'la…
1. 复制表结构及其数据: create table table_name_new as select * from table_name_old 2. 只复制表结构: create table table_name_new as select * from table_name_old where 1=2; 或者: create table table_name_new like table_name_old 3. 只复制表数据: 如果两个表结构一样: insert into table_na…
一.复制表结构及其数据 create table new_table as (select * from old_table); 二.只复制表结构 create table new_table as (select * from old_table where 1=2); 三.只复制表数据 如果两个表结构一样: insert into new_table select * from old_table; 如果两个表结构不一样: insert into new_table(column1,colu…
1. 复制表结构及其数据: create table table_name_new as select * from table_name_old 2. 只复制表结构: create table table_name_new as select * from table_name_old where 1=2; 或者: create table table_name_new like table_name_old 3. 只复制表数据: 如果两个表结构一样: insert into table_na…
1. 复制表结构及其数据: create table table_name_new as select * from table_name_old 2. 只复制表结构: create table table_name_new as select * from table_name_old where 1=2; 或者: create table table_name_new like table_name_old 3. 只复制表数据: 如果两个表结构一样: insert into table_na…