The following examples compare a single APPLY clause to multiple APPLY specifications. The examples use the syntax discussed in the previous procedure:
- Single APPLY target:
APPLY ('INSERT INTO EMP_TARGET1 (:EMP_ID, :EMP_LNAME, :EMP_FNAME, :EMP_DEP);') TO OPERATOR (LOAD_OPERATOR_1) SELECT * FROM OPERATOR (EXPORT_OPERATOR_1);
- Two APPLY targets:
APPLY ( 'UPDATE table1 SET C2 = :col2 WHERE C1 = :col1;', 'INSERT INTO table2 ( :col1, :col2, …)' ) TO OPERATOR ( UPDATE_OPERATOR () [2]) ,APPLY ( 'INSERT INTO table3 ( :col1, :col2, …)' ) TO OPERATOR ( LOAD_OPERATOR () [3] ATTR(….)) SELECT * FROM OPERATOR (EXPORT_OPERATOR_1);