PL/SQL   «Prev 

Updating rows within Nested Table Syntax

Syntax for Update Statement
  FROM <parent table_name> <table alias>
  WHERE <clause>
SET <nested table> = <variable>
WHERE <clause>;

Location 1 The UPDATE statement with the TABLE keyword
Location 2 The SELECT statement for selecting a particular record from the parent table
Location 3 The SET clause to update the value within a nested table
Location 4 The WHERE clause to select a particular row of the nested table

What is a VARRAY?

VARRAY stands for variable-size array. It is an array that can be either manipulated as a whole or individually as elements.
It has a maximum size and can contain 0 to any number of elements up to the maximum specified. VARRAY is stored in-line and that means the data of a column of VARRAY type is stored along with the remaining data of the row.
You can use VARRAY data type for:
  1. A column in a relational table
  2. A PL/SQL variable
  3. A PL/SQL parameter of procedure or function
  4. A PL/SQL function return type
  5. A data attribute of an object type