description |
---|
Returns the ASCII code for the first character of a string. If the string is empty, 0 is returned. |
- expression: The string for which the ASCII code for the first character in the string is returned.
Examples
{% code title="ASCII example" %}
SELECT ASCII ('SPICE')
-- 68
{% endcode %}
{% code title="ASCII example" %}
SELECT ASCII ('D')
-- 68
{% endcode %}
{% code title="ASCII example" %}
SELECT ASCII ('')
-- 0
{% endcode %}