• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. SQL Reference
  5. SQL Syntax
  6. ROLLBACK

ROLLBACK

Function

Rolls back the current transaction and backs out all updates in the transaction.

ROLLBACK backs out of all changes that a transaction makes to a database if the transaction fails to be executed due to a fault.

Precautions

If a ROLLBACK statement is executed out of a transaction, no error occurs, but a warning information is displayed.

Syntax

ROLLBACK [ WORK | TRANSACTION ];

Parameter Description

WORK | TRANSACTION

Optional keyword that more clearly illustrates the syntax.

Examples

-- Start a transaction:
START TRANSACTION;

-- Back out all changes:
ROLLBACK;

Helpful Links

COMMIT