Declare row-type variables
Row-type variables hold data from named or unnamed row
types. You can define a named row variable or an unnamed
row variable. Suppose you define the named row types that the
following figure shows.
If you define a variable with the name of a named row
type, the variable can only hold data of that row type. In the following
figure, the person variable can only hold data of employee_t type.
To define a variable that holds data stored in an unnamed
row type, use the ROW keyword followed by the fields of the row type,
as the following figure shows.
Because unnamed row types are type-checked for structural
equivalence only, a variable defined with an unnamed row type can
hold data from any unnamed row type that has the same number of fields
and the same type definitions. Therefore, the variable manager can
hold data from any of the row types in the following figure.
Important: Before you can use a row type variable,
you must initialize the row variable with a LET statement or SELECTINTO
statement.