DB2 Scalar functions - ASCII


Volta a página anterior

Volta ao Menu das scalar functions

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

ASCII

The ASCII function returns the ASCII code value of the leftmost character of the argument as an integer.

ASCII(expression)

The schema is SYSFUN.

expression
An expression that returns a built-in character string or Boolean value.
In a Unicode database, the expression can also return a graphic string, in which case it is first converted to a character string before the function is evaluated.
The maximum length is:
  • 4000 bytes for a VARCHAR
  • 1,048,576 bytes for a CLOB

Result

The result of the function is always INTEGER.

The result can be null; if the argument is null, the result is the null value.


© Copyright IBM Corp.