Inserting structured type attributes into columns
To insert an attribute of a user-defined structured type into a column that is of the same type as the attribute using embedded static SQL, enclose the host variable that represents the instance of the type in parentheses, and append the double-dot operator and attribute name to the closing parenthesis.
About this task
For example, consider the following situation:
PERSON_Tis a structured type that includes the attributeNAMEof typeVARCHAR(30).T1is a table that includes a columnC1of typeVARCHAR(30).personhvis the host variable declared for typePERSON_Tin the programming language.
The proper syntax for inserting the NAME attribute into column C1 is:
EXEC SQL INSERT INTO T1 (C1) VALUES ((:personhv)..NAME)