关于oracle:oracle函数表复制CT和IS

CT和IS(表复制)

1、CT(create table … as)

  • 语法

    create table <new table> as select * from <exists table>

    <br/>

  • 案例

    查问emp表中deptno为10的数据,创立表emp10 (创立出emp10表

    create table emp10 as select * from emp where deptno=10; 

<br/><br/>

2、IS (insert into …select..)

  • 语法

    insert into table2(f1,f2...) select v1,v2....from table1 

<br/>

  • 案例

    查问emp表中deptno为50的数据,插入到emp10表中(emp10已存在

    insert into  emp10(empno,ename,job) select empno,ename,job  from emp where deptno=50;

    <br/><br/>

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理