ASCII function [String]

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

Syntax
ASCII( string-expression )
Parameters
  • string-expression   The string.

Remarks

If the string is empty, then ASCII returns zero. Literal strings must be enclosed in quotes. If the database character set is multibyte and the first character of the parameter string consists of more than one byte, the result is NULL.

See also
Standards and compatibility
  • SQL/2003   Vendor extension.

Example

The following statement returns the value 90.

SELECT ASCII( 'Z' );