Using a Nested Table Type to Define a Column
CREATE TYPE t_address AS OBJECT (
street VARCHAR2(15),
city VARCHAR2(15),
state CHAR(2),
zip VARCHAR2(5)
);
/
CREATE TYPE t_nested_table AS TABLE OF t_address;
/
CREATE TABLE emp (
id INTEGER PRIMARY KEY,
first_name VARCHAR2(10),
last_name VARCHAR2(10),
addresses t_nested_table
)
NESTED TABLE addresses
STORE AS nested_addresses;
The NESTED TABLE
clause identifies the name of the nested table column.
The STORE AS
clause specifies the name of the nested table where the actual elements are stored.
Home »
Oracle »
PL/SQL »
Oracle »
PL/SQL »
Nested Table:
- Creating a Nested Table Type
- Using a Nested Table Type to Define a Column
- Get Information on Nested Table
- Populating a Nested Table with Elements
- Retrieving Elements from a Nested Table
- Using TABLE() with a Nested Table
Related: