Modifying Elements of a Varray
The elements in a varray can be modified only as a whole.
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> UPDATE emp SET addresses = t_varray(
2 'new value',
3 'new value 2',
4 'new value 3'
5 )
6 WHERE id = 1;
1 row updated.
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: