Oracle SQL:从具有嵌套表的表中选择 [英] Oracle SQL: select from table with nested table
本文介绍了Oracle SQL:从具有嵌套表的表中选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何从具有类型列的表中进行选择语句? 此列的类型定义为:
I wonder how can i make select statement from table which have a typed column ? Type of this column is defined as:
create or replace TYPE "MYCOL" as table of MYTYPE;
create or replace TYPE "MYTYPE" as OBJECT
( myid Number, myname Varchar2);
UPD1 表定义为
CREATE TABLE "T_TABLE"
( "ID" NUMBER NOT NULL ENABLE, "NAME" "MYCOL" )
如果我用select * from T_TABLE
选择此列,我将得到以下无意义的结果:
If i select this column with select * from T_TABLE
i will get this not informative result:
1, MYSCHEMA.MYCOL([MYSCHEMA.MYTYPE],[MYSCHEMA.MYTYPE])
我只想打开这种类型.
推荐答案
尝试如下:
select t."ID", tt.myid, tt.myname
from "T_TABLE" t, table(t."NAME") tt;
这篇关于Oracle SQL:从具有嵌套表的表中选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文