语法结构: INSERT INTO 表名 select查询语句;
1) 从emp2表中查询出员工工资为3000的,同时将查询结果插入到emp2表中
2) 复制emp表为emp_bak,再将emp表中数据插入到emp_bak中
a) create table emp_bak as select * from emp;
b) insert into emp_bak select * from emp2 where sal = 3000;
更新时间:2017年04月06日
语法结构: INSERT INTO 表名 select查询语句;
1) 从emp2表中查询出员工工资为3000的,同时将查询结果插入到emp2表中
2) 复制emp表为emp_bak,再将emp表中数据插入到emp_bak中
a) create table emp_bak as select * from emp;
b) insert into emp_bak select * from emp2 where sal = 3000;