The DDL operator can be specified in the APPLY statement in either single or multi-statement format. To execute each statement as its own transaction, you should have one SQL statement per DML group (enclosed in parentheses).
If more than one statement is specified in a DML group, the operator combines them all into a single multi-statement request and sends it to the Teradata Database as one transaction. Teradata Database enforces the rule that a multi-statement DML group can have only one DDL statement and it must be the last statement in the transaction, which means the last statement in the group. The SQL statements are executed by groups in the order they are specified in the APPLY statement. If any statement in the group fails, then all statements in that group are rolled back and no more groups are processed.
The following is a simplified example of a DDL operator in a single-statement format:
The following is a simplified example of a DDL operator in a multi-statement format: