15.00 - 15.10 - Teradata Mode Transactions - Teradata Database

Teradata Database Introduction to Teradata

Product
Teradata Database
Release Number
15.00
15.10
Content Type
User Guide
Publication ID
B035-1091-151K
Language
English (United States)
Last Update
2018-09-25

Teradata mode transactions can be either implicit or explicit. An explicit, or user-generated, transaction is a single set of BEGIN TRANSACTION/END TRANSACTION statements surrounding one or more requests. All other requests are implicit transactions.

Consider the following transaction:

    	BEGIN TRANSACTION;
    	DELETE FROM Employee
    	WHERE Name = ‘Smith T’;
    	UPDATE Department
    	SET EmpCount=EmpCount-1
    	WHERE DeptNo=500;
    	END TRANSACTION;

If an error occurs during the processing of either the DELETE or UPDATE statement within the BEGIN TRANSACTION and END TRANSACTION statements, the system restores both Employee and Department tables to the states at which they were before the transaction began. If an error occurs during a Teradata transaction, then the system rolls back the entire transaction.