begin transaction

Marks the starting point of a user-defined transaction.

Syntax

begin tran[saction] [transaction_name]

Parameters

Examples

Usage

  • Define a transaction by enclosing SQL statements and system procedures within the phrases begin transaction and commit. If you set chained transaction mode, the SAP ASE server implicitly invokes a begin transaction before the following statements: delete, insert, open, fetch, select, and update. You must still explicitly close the transaction with a commit.

  • To cancel all or part of a transaction, use the rollback command. The rollback command must appear within a transaction; you cannot roll back a transaction after it is committed.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

No permission is required to use begin transaction.

Related reference
commit
begin transaction
delete
insert
open
fetch
select
update
rollback
save transaction