首页 > 开发 > 综合 > 正文

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

2024-07-21 02:33:07
字体:
来源:转载
供稿:网友

请问在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;  重点是把握插入一个嵌套表对应的类型对象。


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表