BEGIN Statement

Marks the beginning of a transaction that comprises multiple statements.

Category: Data Control
Restriction: The BEGIN statement has an effect only when autocommit functionality is off.
Supports: EXECUTE Statement
Data source: Greenplum, MDS, MySQL, ODBC, Oracle, SAP HANA, Sybase IQ, Teradata

Syntax

BEGIN [TRANSACTION];

Details

The BEGIN statement marks a point at which the data is logically and physically consistent. If errors are encountered during a transaction, the user can roll back all changes to the data to this last known state of consistency.
When you use FedSQL processing, this statement is not really necessary. By default, autocommit functionality is on, which means that all updates are committed immediately after each request is submitted, and no rollback is possible. A transaction is effectively started with each update. The BEGIN statement is provided to enable you to mark the beginning of a transaction that comprises multiple statements.
See the server administration documentation for information about how to turn off autocommit functionality. For example, see SAS Federation Server: Administrator’s Guide for the appropriate connection option to the FedSQL driver. For the FEDSQL procedure, see Base SAS Procedures Guide.
Note: BEGIN has no effect on the SASHDAT data source.

See Also