begin...end  break

Chapter 1: Commands

begin transaction

Description

Marks the starting point of a user-defined transaction.

Syntax

begin tran[saction] [transaction_name]

Parameters

transaction_name

is the name assigned to this transaction. Transaction names must conform to the rules for identifiers. Use transaction names only on the outermost pair of nested begin transaction/commit or begin transaction/rollback statements.

Examples

Example 1

Explicitly begins a transaction for the insert statement:

begin transaction
    insert into publishers (pub_id) values ("9999")
commit transaction

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

begin transaction permission defaults to all users. No permission is required to use it.

See also

Commands commit, rollback, save transaction





Copyright © 2005. Sybase Inc. All rights reserved. break

View this book as PDF