TiDBTiDB Docs Dash 2024

Jan 9 - Jan 12 (UTC)
Join us to improve docs and win a prize!
Sign InTry Free

DEALLOCATE

The DEALLOCATE statement provides an SQL interface to server-side prepared statements.

Synopsis

DeallocateStmt
DeallocateSymPREPAREIdentifier
DeallocateSym
DEALLOCATEDROP
Identifier
identifierUnReservedKeywordNotKeywordTokenTiDBKeyword

Examples

mysql> PREPARE mystmt FROM 'SELECT ? as num FROM DUAL'; Query OK, 0 rows affected (0.00 sec) mysql> SET @number = 5; Query OK, 0 rows affected (0.00 sec) mysql> EXECUTE mystmt USING @number; +------+ | num | +------+ | 5 | +------+ 1 row in set (0.00 sec) mysql> DEALLOCATE PREPARE mystmt; Query OK, 0 rows affected (0.00 sec)

MySQL compatibility

The DEALLOCATE statement in TiDB is fully compatible with MySQL. If you find any compatibility differences, report a bug.

See also

Was this page helpful?

Download PDFRequest docs changesAsk questions on Discord
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.