BATCH

Syntax

BATCH BEGIN|END|CLEAR;

Description

Switches batch mode on or off. In this mode, SQL statements are not immediately executed but bundled, this can increase the execution speed.

Command Description
BEGIN Switches to batch mode. From this point all entered SQL statements are saved and only executed after BATCH END has been entered.
CLEAR Deletes all stored statements.
END Runs all SQL statements entered since the last BATCH BEGIN and exits batch mode.

If an exception is raised for a statements in the batch mode, the following statements are not executed anymore and the status before the batch execution is restored. A single exception is the COMMIT statement which finishes a transaction and stores changes persistently.

If EXAplus is in batch mode, only specific statements are accepted: 

  • SQL Statements (see SQL Reference section) except scripts
  • DEFINE and UNDEFINE
  • START, @, and @@
  • PAUSE
  • PROMPT
  • SHOW
  • SPOOL
Examples
BATCH BEGIN;
insert into t values(1,2,3);
insert into v values(4,5,6);
BATCH END;