RSS
热门关键字:  下载  cms  模版  开源  dedecms
当前位置 :| 主页 > 站长学院 > 数据库 > Oracle >

嵌入表里插入数据和修改嵌入表的数据

来源:ccidnet.com 作者:lynn  时间:2006-10-08 Tag: 点击:

请问在oracle9i里,怎样想嵌入表里插入数据和修改嵌入表的数据,谢谢,我摸索了好长时间,不得门道。oracle8i的参考书里的语句在oracle9i行不通,请各位指点。

  create table test(a varchar2(10), b nested_tab_test) nested table b store as test1;

  首先要插入一个空的嵌套表类型值。

  insert into test(a,b) values('aaa',nested_tab_test());

  插入具体值

  insert into table (select b from test where a='aaa') values('a01');

  如果是从别的表插入数据可以这么操作。

  insert into test select 'aaa',cast(multiset(select a from test2 ) as nested_tab_test) from dual;

  重点是把握插入一个嵌套表对应的类型对象。


最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
栏目列表