Sign InTry Free

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
BATCHONColumnNameLIMITNUMDryRunOptionsDeleteFromStmt
DryRunOptions
DRYRUNQUERY

MySQL compatibility

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

See also

Download PDF
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.