Using Structures and Arrays to Insert
To declare one structure to hold all the variables, use the following syntax:
EXEC SQL INSERT INTO <table name> VALUES (…) RETURNING :hoststructure1
For the array insert feature using a cursor, use the following syntax:
EXEC SQL
DECLARE CURSORNAME CURSOR FOR
INSERT INTO TABLENAME VALUES (:col1,:col2);
EXEC SQL FOR N
OPEN CURSORNAME;