END TRANSACTION Usage Notes - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Publication Date
February 2025
Publication ID
B700-4600-008K
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
ft:sourceId
dita
dita:id
jbe1714339405530

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.