PL/SQL   «Prev 

Flattening a Nested Table Syntax

SELECT <expression-list>
  FROM THE (SELECT <outer column name> 
    FROM <outer table>
    WHERE <condition on outer table>)
  WHERE <condition on inner table>;

Location 1 The SELECT clause for selecting attributes (that is, columns) from the nested table
Location 2 The FROM THE clause for specifying details of the outer table
Location 3 The SELECT clause for selecting the nested table column from the outer table and specifying the particular row within the WHERE clause
Location 4 The FROM clause to select the outer table
Location 5 The WHERE clause to select a particular row from the outer table
Location 6 WHERE <condition on inner table>, The WHERE clause to select a particular row from the inner table