Sign InTry Free

DO

This statement executes an expression, without returning a result. In MySQL, a common use-case is to execute stored programs without needing to handle the result. Since TiDB does not provide stored routines, this function has a more limited use.

Synopsis

DoStmt:

DoStmt

ExpressionList:

ExpressionList

Expression:

Expression

Examples

mysql> SELECT SLEEP(5); +----------+ | SLEEP(5) | +----------+ | 0 | +----------+ 1 row in set (5.00 sec) mysql> DO SLEEP(5); Query OK, 0 rows affected (5.00 sec) mysql> DO SLEEP(1), SLEEP(1.5); Query OK, 0 rows affected (2.50 sec)

MySQL compatibility

This statement is understood to be fully compatible with MySQL. Any compatibility differences should be reported via an issue on GitHub.

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.