posts - 84,  comments - 54,  trackbacks - 0
1、单行插入
    insert into <tabler>[(column,[column,...])]values(value,[value,....])
    使用default 插入数据,在values当中使用default会插入默认值,或者NULL

2、使用字查询插入数据。
      INSERT INTO <TABLE> subquery.

     INSERT ALL insert_into_clause [value clause]subquery
    INSERT conditional_insert_clause subquery

    insert all 
    when deptno = 10 then into dept10
    when deptno = 20 then into dept20
    else into others
     select * from emp;

      INSERT FIRST(如果先前的数据已经被使用过,那么在后续当中则不会再使用这些数据) 
    when deptno = 10 then into dept10
    when deptno = 20 then into dept20
    else into others
     select * from emp;

另外提供create table as subquery;

posted on 2009-06-23 11:37 JavaCoffe 阅读(650) 评论(0)  编辑  收藏 所属分类: Oralce&&PL/SQL

只有注册用户登录后才能发表评论。


网站导航:
 
<2009年6月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(5)

随笔分类(80)

收藏夹(1)

最新随笔

积分与排名

  • 积分 - 56732
  • 排名 - 900

最新评论

阅读排行榜