Text & patterns
Scalar
unicode()
Returns the unicode codepoint of the first character of the string
Arguments & returns
unicode(str)
Scalar
| Overload link | str |
Returns |
|---|---|---|
| #01 | VARCHAR |
INTEGER |
Example
Haybarn WASM 1.5.5-rc3 · In your browser
Engine example · Run to view results.
Catalog examples
SELECT
unicode('ü');
In other engines
Used in larger rewrites 1
These examples use unicode as one part of a larger SQL translation.
Snowflakeunicode()
UNICODE(foo)
CASE WHEN foo = '' THEN 0 ELSE UNICODE(foo) END