1.复制表结构及数据 格式:select * into 新表名 from 要复制的表名 --例如:select * into temp from users 2.只复制表数据 格式:insert into 要复制入的表名 select * from 复制的表 --例如:insert into temp select * from Users…
Sql Server(sybase): 1.复制表结构: 新建表student2,并且结构同表syn_xj_student一致.Sql语句如下: 2.复制表数据,并排除俩表中相同的数据: insert into syn_xj_student2 select * from syn_xj_student where f_id not in (select f_id from syn_xj_student2) mysql: 1.复制表结构: create table topic like bbs_to…
SQL Server中,如果目标表存在: insert into 目标表 select * from 原表; SQL Server中,,如果目标表不存在: select * into 目标表 from 原表; Oracle中,如果目标表存在: insert into 目标表 select * from 原表; commit; Oracle中,如果目标表不存在: create table 目标表 as select * from 原表;…