Skip to main content

UNICODE

Returns the numeric Unicode code point of the first character of a string.

See also:
[SELECT] [CHAR]


Syntax​

SELECT UNICODE(string) FROM <multipartIdentifier>;

Arguments​

string
A string.

Return Value(s)​

Returns an integer. The result is NULL for NULL or an empty string.


Examples​

Code point of the first character​

The following query returns the code points of S and é:

SELECT UNICODE('StackQL') AS a, UNICODE('é') AS b;
|----|-----|
| a | b |
|----|-----|
| 83 | 233 |
|----|-----|

For more information, see https://www.sqlite.org/lang_corefunc.html#unicode