SQLite char() Function
The SQLite char() function accepts a series of Unicode code point values as parameters and returns a string consisting of the characters corresponding to these parameters in the order of the parameters.
Syntax
Here is the syntax of the SQLite char() function:
char(x1,x2,...,xN)
Parameters
x1,x2,...,xN-
Required.
x1,x2,...,xNis some integer value that is a Unicode code point value (or ASCII code). You should specify at least one parameter.
Return value
The SQLite char() function returns a string consisting of the characters corresponding to the arguments.
For example, the calculation process of char(65, 66) is as follows:
- The corresponding character of ASCII code
65isA. - The corresponding character of ASCII code
66isB. - Combine
AandBinto a string:AB. char(65, 66)returnsAB.
Examples
To return the character corresponding to 65, use the following statement with an SQLite char() function:
SELECT char(65);
char(65)
--------
ATo return the characters corresponding to the ASCII codes 65 and 66, use the following statement with the SQLite char() function:
SELECT char(65, 66);
char(65, 66)
------------
ABTo return the characters corresponding to the ASCII codes 83, 81, and 76, use the following statement with the SQLite char() function:
SELECT char(83, 81, 76);
char(83, 81, 76)
----------------
SQL