Select from a VARRAY with a structured data type?
Im trying to figure out how to access or query a table that is set up as follows
Student table
Columns
stuid
name(firstm last) ->This column is set up as a "structured type"
bdate
program
areas(area, depth)->This is set up as a VARRAY
In the schema for the above table, the data type of "name" is a structured data type (containing two strings, first and last) and "areas" should be declared as a varying array of 3 entries (each entry consisting of two fixed strings, area and depth).
I was able to find info on how to query a table with a VARRAY column (had to do with casting or creating a view), but Im not sure how to query for the column "areas" as this is set up as a VARRAY with a further layer of a structured type.
So my code looks some what like this
CREATE OR REPLACE TYPE AREAS_TYPE AS OBJECT (
AREA NUMBER(5),
DEPTH NUMBER(5)
);
/
CREATE OR REPLACE TYPE AREA_VARRAY_TYPE AS VARRAY(3) OF AREAS_TYPE;
Is this even possible?
Thanks