ABORT - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
psg1480972718197.ditamap
dita:ditavalPath
changebar_rev_16_10_exclude_audience_ie.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

Purpose

Terminates the current transaction and rolls back its updates.

For information about the temporal form of ABORT, see Temporal Table Support .

Required Privileges

None.

Syntax

Syntax Elements

abort_message
Text of the message to be returned when the transaction is terminated.
If abort_message is not specified, the message defaults to “user-generated transaction ABORT”.
FROM option
A clause that is required only if the WHERE clause includes subqueries or if the request is preceded with a temporal qualifier.
You can code scalar subqueries as an expression within a derived table in FROM clause conditions in the same way you can specify them for a SELECT request.
See Scalar Subqueries and Rules for Using Scalar Subqueries in ABORT Statements. Note, however, that you cannot code a derived table as a scalar subquery.
The contents of the FROM option are described in FROM Clause.
WHERE abort_condition
A clause that introduces a conditional expression whose result must evaluate to TRUE if the transaction is to be rolled back. The expression can specify aggregate operations and scalar subqueries.
If the WHERE clause is omitted, termination is unconditional. See WHERE Clause.
If you specify the value for a row-level security constraint, it must be expressed in its encoded form.
The WHERE condition specifies an expression whose result must evaluate to TRUE if termination is to occur. If the result is FALSE, transaction processing continues.

ANSI Compliance

ABORT is a Teradata extension to the ANSI SQL:2011 standard. It is a synonym for the ANSI SQL:2011-compliant statement ROLLBACK (see “ROLLBACK”).