SQL_START_TRANSACTION_STMT¶

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

Transactions in SQL are used to maintain atomicity within an process. If one procedure in the transaction fails, then they all will fail. This command is used to start an SQL transaction. Inside of a transaction, there can be any number of SQL statements, none of which will be executed until SQL_COMMIT_STMT is called. Note that transactions are generally only needed when a table is being altered.

Syntax

SQL_START_TRANSACTION_STMT

Example

SQL_START_TRANSACTION_STMT
SQL_SET_STMT to "UPDATE CUSTOMER SET STATUS = 'Inactive'"
SQL_PREPARE_STMT
SQL_EXECUTE_STMT
SQL_COMMIT_STMT