CHR
Syntax
Description
CHR()
interprets each argument N as an integer and returns a [VARCHAR(1)](../../../../data-types/string-data-types/varchar.md)
string consisting of the character given by the code values of the integer. The character set and collation of the string are set according to the values of the [character_set_database](../../../../../server-usage/replication-cluster-multi-master/optimization-and-tuning/system-variables/server-system-variables.md#character_set_database)
and [collation_database](../../../../../server-usage/replication-cluster-multi-master/optimization-and-tuning/system-variables/server-system-variables.md#collation_database)
system variables.
CHR()
is similar to the [CHAR()](char-function.md)
function, but only accepts a single argument.
CHR()
is available in all sql_modes.
Examples
See Also
ASCII() - Return ASCII value of first character
ORD() - Return value for character in single or multi-byte character sets
CHAR() - Similar function which accepts multiple integers
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?