8.3.2. ASCII_VAL()
Available in
DSQL, PSQL
Possible name conflict
YES → Read details
Syntax
ASCII_VAL (ch)
Parameter | Description |
---|---|
ch | A string of the |
Result type
SMALLINT
Description
Returns the ASCII code of the character passed in.
If the argument is a string with more than one character, the ASCII code of the first character is returned.
If the argument is an empty string, 0 is returned.
If the argument is
NULL
,NULL
is returned.If the first character of the argument string is multi-byte, an error is raised. (A bug in Firebird 2.1 - 2.1.3 and 2.5.0 causes an error to be raised if any character in the string is multi-byte. This is fixed in versions 2.1.4 and 2.5.1.)