Re: Creating a Table of a Type which contains a nested table




"hpuxrac" <johnbhurley@xxxxxxxxxxxxx> wrote in message
news:5400e817-335b-4bca-808e-5d3a2849a2ea@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Feb 8, 5:21 pm, "Dereck L. Dietz" <diet...@xxxxxxxxxxxxx> wrote:
Oracle 10.2.0.3
Windows Server 2003

Example 1 with VARRAY:

CREATE OR REPLACE TYPE t_test AS OBJECT
(
field1 VARCHAR2(10),
array1 t_array_va,
array2 t_array_va
);

CREATE OR REPLACE TYPE t_test_tab AS TABLE OF t_test;
/

Example 2 with NESTED TABLES:

CREATE OR REPLACE TYPE t_test AS OBJECT
(
field1 VARCHAR2(10),
array1 t_array_nt,
array2 t_array_nt
);

CREATE OR REPLACE TYPE t_test_tab AS TABLE OF t_test;
/

I've seen example 1 syntax in Oracle documentation but not for example 2.
Is the syntax for example 2 correct?

Are you getting an error message?

Syntax and documentation are available on ( among other places )
tahiti.oracle.com ...

I've been TRYING to look all weekend but nothing comes up. Can somebody
just please answer my question and help me out?

I want to use a structure in a pipeline function that I will have to define
a type of and the base structure will be a table with one or two columns
which are defined as a nested table. I can get the VARRAY to work but can't
figure out how to do it with Nested Tables.


.



Relevant Pages


Loading