Insert collection values into columns

This section describes how to insert a collection value into a column with DB-Access. It does not discuss how to insert individual elements into a collection column. To access or modify the individual elements of a collection, use an SPL routine or program. For information about how to create programs to insert into a collection, see the HCL OneDB™ ESQL/C Programmer's Manual. For information about how to create an SPL routine to insert into a collection, see Create and use SPL routines.

The examples that this section provides are based on the manager table in the following figure. The manager table contains both simple and nested collection types.
Figure 1: Create the manager table.
CREATE TABLE manager
(
  mgr_name        VARCHAR(30),
  department      VARCHAR(12),
  direct_reports  SET(VARCHAR(30) NOT NULL),
  projects        LIST(ROW(pro_name VARCHAR(15),
                    pro_members SET(VARCHAR(20) NOT NULL))
                    NOT NULL)
);