Oracle 中的嵌套表中的列又嵌套一个嵌套表怎么用?
1。create type nativeplaceable as varray(3)of varchar2(10);
2。create type teacherable as object(tname varchar2(10),tnativeplace nativeplaceable);
3。create type courseable as object(cname varchar2(10));
4。create type course as table of courseable;
5。create type studentable as object(sname varchar2(10),snativeplace nativeplaceable,scourse course)nested table scourse store as c_s;
6。create type student as table of studentable;
7。create table co/0urses(cid int ,cname varchar2(10),cteacher teacherable,cstudent student)nested table cstudent store as s_c;--7步是错的。主要原因是这个嵌套表中的还有嵌套表。不知道Oracle中有没有这中语法。
1。create type nativeplaceable as varray(3)of varchar2(10);
2。create type teacherable as object(tname varchar2(10),tnativeplace nativeplaceable);
3。create type courseable as object(cname varchar2(10));
4。create type course as table of courseable;
5。create type studentable as object(sname varchar2(10),snativeplace nativeplaceable,scourse course)nested table scourse store as c_s;
6。create type student as table of studentable;
7。create table co/0urses(cid int ,cname varchar2(10),cteacher teacherable,cstudent student)nested table cstudent store as s_c;--7步是错的。主要原因是这个嵌套表中的还有嵌套表。不知道Oracle中有没有这中语法。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货