UPDATE on whole Nested Tables : Nested Object Table « Object Oriented « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> CREATE OR REPLACE TYPE numberTableType AS TABLE OF NUMBER(10);
  2  /

Type created.

SQL>
SQL> CREATE TABLE address_list (
  2      list_id VARCHAR2(6)PRIMARY KEY,
  3      home_addresses numberTableType )
  4  NESTED TABLE home_addresses STORE AS home_addreses_tab;


SQL>
SQL>
SQL> INSERT INTO address_list VALUES('H101',numberTableType(1001,1002,1003,1004));


SQL>
SQL>
SQL> DECLARE
  2    v_numberVarryType numberTableType :=numberTableType(1011,1012,1013);
  3  BEGIN
  4    UPDATE address_list
  5    SET home_addresses =v_numberVarryType
  6    WHERE list_id ='H102';
  7  END;
  8  /


SQL>
SQL> drop table address_list;


SQL>








32.10.Nested Object Table
32.10.1.Object References
32.10.2.Inserting Rows into the nested-object table
32.10.3.Selecting Rows from the nested-object table
32.10.4.Select a single row from the nested-object table
32.10.5.A row is selected based on the inner column object
32.10.6.Stored Nested Tables
32.10.7.DML on whole Nested Tables
32.10.8.UPDATE on whole Nested Tables
32.10.9.DELETE on whole Nested Tables
32.10.10.SELECT on whole Nested Tables