Notes

Recommended coding practices: An explicit COMMIT or ROLLBACK statement should be coded at the end of an application process. Either an implicit commit or rollback operation will be performed at the end of an application process depending on the application environment. Thus, a portable application should explicitly execute a COMMIT or ROLLBACK before execution ends in those environments where explicit COMMIT or ROLLBACK is permitted.

An implicit COMMIT or ROLLBACK may be performed under the following circumstances.

Effect of commit: Commit without HOLD causes the following to occur:

Row lock limit: A unit of work can include the processing of up to 4 million rows, including rows retrieved during a SELECT or FETCH statement61, and rows inserted, deleted, or updated as part of INSERT, DELETE, and UPDATE statements.62

Unaffected statements: The commit and rollback operations do not affect the DROP SCHEMA statement, and this statement is not, therefore, allowed in an application program that also specifies COMMIT(*CHG), COMMIT(*CS), COMMIT(*ALL), or COMMIT(*RR).

Commitment definition use: The commitment definition used by SQL is determined as follows:


61.
This limit also includes:
62.
Unless you specified COMMIT(*CHG) or COMMIT(*CS), in which case these rows are not included in this total.