START TRANSACTION

The START TRANSACTION statement starts a new unit of work.

Invocation

This statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared.

Syntax

Read syntax diagramSkip visual syntax diagram
   .-BEGIN WORK--------.   
>>-+-START TRANSACTION-+---------------------------------------><

Description

When you issue START TRANSACTION, DB2® Everyplace® treats subsequent statements as a new unit of work. If this statement is executed within a unit of work, an error is returned (SQLState 25501).

Rules

A START TRANSACTION statement cannot be executed within a unit of work.

Notes

This statement explicitly starts a new unit of work for a database connection that uses auto-commit mode.

Example

Start a new unit of work for a database connection that currently uses auto-commit mode.
START TRANSACTION
Related reference
COMMIT
ROLLBACK


Library | Support | Terms of use

Last updated: Wednesday, October 17, 2006
(C) Copyright IBM Corporation 2004, 2006. All Rights Reserved.
This information center is built on Eclipse. (http://www.eclipse.org)