Access a row variable
You can perform the following operations on the row host
variable with the collection-derived table clause:
- You can select a field or fields from a row host variable
with the collection-derived table clause in the FROM clause of SELECT
statement.
For more information, see Select from a row variable.
- You can update all or some fields in the row host variable
collection-derived table clause after the UPDATE keyword in an UPDATE
statement.
For more information, see Update a row variable.
The insert and delete operations are not supported on row variables.
For more information, see Insert into a row variable and Delete from a row variable.
Tip: If
you only need to insert or update a row-type column with literal values,
you do not need to use a row host variable. Instead, you can
explicitly list the literal-row value in either the INTO clause of
the INSERT statement or the SET clause of the UPDATE statement.
For more information, see Insert into and update row-type columns.
When the row host variable contains the values you want, update the row-type column with the contents of the host variable. For more information, see Access a typed table. For more information about the syntax of the collection-derived table clause, see the description of the collection-derived table segment in the HCL OneDB™ Guide to SQL: Syntax.