You are viewing the documentation of an older version of the TiDB database (TiDB v3.1).

It is recommended that you use the latest LTS version of the TiDB database.

Cast Functions and Operators

TiDB supports all of the cast functions and operators available in MySQL 5.7.

BINARYCast a string to a binary string
CAST()Cast a value as a certain type
CONVERT()Cast a value as a certain type

Cast functions and operators enable conversion of values from one data type to another.

Was this page helpful?