SQLite 3 reference · String Functions
SQLite CHAR() Function
Return a string made from Unicode code point numbers, such as char(72, 105) for 'Hi'. The reverse of unicode().
SQLite 3 Since 3.7.16
Syntax
char(X1, X2, ..., XN)
Parameters
| Parameter | Description |
|---|---|
X1 … XN |
Unicode code points as integers. |
Return value
Text.
Examples
SELECT char(72, 105) AS greeting, char(233) AS e_acute;
Output
greeting | e_acute Hi | é
SELECT 'line one' || char(10) || 'line two' AS two_lines;
Output
two_lines line one line two
Version history
| Version | Change |
|---|---|
| SQLite 3.7.16 | Added |
In other languages
CHR()· PostgreSQL
Related
UNICODE()· Return the Unicode code point of the first character of a string, such as 65 for 'A'.HEX()· Return the hexadecimal form of a value's bytes (its UTF-8 text for strings). Often used to display BLOBs.- SQL String Functions · tutorial