Conversion functions

Updated at:

PolarDB-X supports the following conversion functions.

FunctionReturnsDescriptionExample
BINARYBinary stringConverts a string to a binary string.SELECT BINARY "RUNOOB"; → RUNOOB
CAST(x AS type)The specified typeConverts a value to the specified data type.SELECT CAST("2017-08-29" AS DATE); → 2017-08-29