ASCII function [String]

Function

Returns the integer ASCII value of the first byte in a string-expression.

Syntax

ASCII ( string-expression )

Parameters

string-expression The string

Example

The following statement returns the value 90, when the collation sequence is set to the default ISO_BINENG:

SELECT ASCII( 'Z' ) FROM iq_dummy

Usage

If the string is empty, ASCII returns zero. Literal strings must be enclosed in quotes.

Standards and compatibility