Populating a Varray with Elements
CREATE TYPE t_varray AS VARRAY(3) OF VARCHAR2(50);
/
CREATE TABLE emp(
id INTEGER PRIMARY KEY,
first_name VARCHAR2(10),
last_name VARCHAR2(10),
addresses t_varray
);
SQL> INSERT INTO emp VALUES (1, 'Jason', 'Bond',t_varray('Main Street, small town, CA, 12345',
2 'Second Street, middle town, CA, 54321'
3 )
4 );
1 row created.
SQL>
Home »
Oracle »
PL/SQL »
Oracle »
PL/SQL »
Varrays:
- Creating a Varray Type
- Using a Varray Type to Define a Column
- Getting Information on a Varray
- Populating a Varray with Elements
- Retrieving Elements from a Varray
- Using TABLE() to Treat a VArrays
- Modifying Elements of a Varray
Related: