END TRANSACTION Usage Notes - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

BEGIN TRANSACTION/END TRANSACTION Pairs and Explicit Transactions

An explicit transaction in Teradata session mode must begin with a BEGIN TRANSACTION statement and end with an END TRANSACTION statement. See BEGIN TRANSACTION.

END TRANSACTION and Multiple-Statement Requests

There can be no more than one END TRANSACTION statement specified in a multiple-statement request, and that statement, if specified, must be the last statement in the request.

Differences Between the Effects of END TRANSACTION and ABORT or ROLLBACK

While an END TRANSACTION request terminates and commits a transaction and drops its Transient Journal, ABORT and ROLLBACK requests terminate a transaction with rollback. See ABORT and ROLLBACK.

The rules for committing transactions using the COMMIT statement also apply to END TRANSACTION. See COMMIT.

Rules for END TRANSACTION Using Embedded SQL

The following rules apply to the use of END TRANSACTION in embedded SQL:
  • END TRANSACTION is valid only when you specify the TRANSACT(BTET) or -tr(BTET) options to the preprocessor. Otherwise, an error is returned and the precompilation fails.
  • END TRANSACTION cannot be performed as a dynamic SQL statement.
  • When END TRANSACTION is processed, the transaction, if not already aborted, is committed.