Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1001 Bytes

sql-statement-batch.md

File metadata and controls

32 lines (20 loc) · 1001 Bytes
title summary
BATCH
An overview of the usage of BATCH for the TiDB database.

BATCH

The BATCH syntax splits a DML statement into multiple statements in TiDB for execution. This means that there are no guarantees of transactional atomicity and isolation. Therefore, it is a "non-transactional" statement.

Currently, only DELETE is supported in BATCH.

Based on a column, the BATCH syntax divides a DML statement into multiple ranges of scope for execution. In each range, a single SQL statement is executed.

For details about the usage and restrictions, see Non-transactional DML statements.

Synopsis

NonTransactionalDeleteStmt ::=
    'BATCH' ( 'ON' ColumnName )? 'LIMIT' NUM DryRunOptions? DeleteFromStmt

DryRunOptions ::=
    'DRY' 'RUN' 'QUERY'?

MySQL compatibility

The BATCH syntax is TiDB-specific and not compatible with MySQL.

See also