Oracle / PLSQL: ASCII Function
This Oracle tutorial explains how to use the Oracle/PLSQL ASCII function with syntax and examples.
Description
The Oracle/PLSQL ASCII function returns the NUMBER code that represents the specified character.
Syntax
The syntax for the ASCII function in Oracle/PLSQL is:
ASCII( single_character )
Parameters or Arguments
- single_character
- The specified character to retrieve the NUMBER code for. If more than one character is entered, the ASCII function will return the value for the first character and ignore all of the characters after the first.
Returns
The ASCII function returns a numeric value.
Applies To
The ASCII function can be used in the following versions of Oracle/PLSQL:
- Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
Example
Let's look at some Oracle ASCII function examples and explore how to use the ASCII function in Oracle/PLSQL.
For example:
ASCII('t') Result: 116 ASCII('T') Result: 84 ASCII('T2') Result: 84
No comments:
Post a Comment