源码
资讯
  当前位置:源码网网络学院网络编程SQL教程 → 嵌入表里插入数据和修改嵌入表的数据
特别推荐
热点TOP10
本周下载排行
本月下载排行
嵌入表里插入数据和修改嵌入表的数据
日期:2006年9月11日 作者: 人气: 查看: [大字体 中字体 小字体]

请问在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;

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

(出处:源码网)

百度搜索 Google搜索 雅虎搜索 我要投稿
相关文章: 相关软件: