BEGIN

Start a transaction block

Table of contents

Synopsis

BEGIN [ WORK | TRANSACTION ] [ transaction_mode [ , ...] ]

where transaction_mode is one of:

ISOLATION LEVEL isolation_level | (READ WRITE | READ ONLY) | [NOT] DEFERRABLE

where isolation_level is one of:

{ SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }

Description

The statement starts a transaction block.

As CrateDB does not support transactions, the only effect of this command is to start a scope in which cursors WITHOUT HOLD can be declared.

Note

Cursors WITHOUT HOLD are closed automatically after an END or COMMIT command. There is no nesting and this happens regardless of how many times BEGIN has run.

Note

For backwards compatibility reasons, the commas between successive transaction_modes can be omitted.

Parameters

WORK | TRANSACTION:

Optional key words. They have no effect.

transaction_mode:

The transactional mode parameter. It has no effect.