ASCII

functionsupportedCore SQL functions

docs.snowflake.com ↗

String & binary functions

Returns the ASCII code for the first character of a string. If the string is empty, a value of 0 is returned. See also: CHAR , UNICODE

Syntax

ASCII( <input> )

Parameters

NameRequiredDescription
inputrequiredThe string for which the ASCII code for the first character in the string is returned.

Returns

The value is an integer that is the numeric representation of the ASCII character. For example, if the input is the letter ‘a’, then the return value is 97.

Usage notes

Referenced by