Name

ascii — Get ASCII value of a character

Synopsis

integer ascii ( arg any );
 

Description

ascii returns the ASCII value of the first character of a string. If an empty string is given, then zero is returned.

Parameters

arg

A string

Return Values

The integer ASCII value of the first character of the input string is returned. If the input string is empty, then zero is returned

Errors

Table 24.3. Errors signalled by ascii

SQLState Error Code Error Text Description
22023 SR044 Function ascii needs a string as an argument, not an argument of type %d (= %s)  

Examples

Example 24.14. Simple example

SQL> select ascii('Zardoz');
callret
INTEGER
_______________________________________________________________________________

90

1 Rows. -- 14 msec.


See Also

aref , chr