语法code
create table <new table> as select * from <exists table>
<br/>table
案例select
查询emp表中deptno为10的数据,建立表emp10 (建立出emp10表)语法
create table emp10 as select * from emp where deptno=10;
<br/><br/>数据
语法查询
insert into table2(f1,f2...) select v1,v2....from table1
<br/>tab
案例co
查询emp表中deptno为50的数据,插入到emp10表中(emp10已存在)new
insert into emp10(empno,ename,job) select empno,ename,job from emp where deptno=50;
<br/><br/>ab