Handle row-type data
In an SPL routine, you can use named ROW types and unnamed ROW types as parameter definitions, arguments, variable definitions, and return values. For information about how to declare a ROW variable in SPL, see Declare row-type variables.
The
following figure defines a row type salary_t and an emp_info table,
which are the examples that this section uses.
Figure 1. Define a row type salary_t
and an emp_info table
CREATE ROW TYPE salary_t(base MONEY(9,2), bonus MONEY(9,2))
CREATE TABLE emp_info (emp_name VARCHAR(30), salary salary_t);
The emp_info table has columns for the employee name and salary information.