totn Oracle Functions

Oracle / PLSQL: ASCIISTR Function

This Oracle tutorial explains how to use the Oracle/PLSQL ASCIISTR function with syntax and examples.

Description

The Oracle/PLSQL ASCIISTR function converts a string in any character set to an ASCII string using the database character set.

Syntax

The syntax for the ASCIISTR function in Oracle/PLSQL is:

ASCIISTR( string )

Parameters or Arguments

string
A string in any character set that you want converted to an ASCII string in the database character set.

Returns

The ASCIISTR function returns a string value.

Applies To

The ASCIISTR function can be used in the following versions of Oracle/PLSQL:

  • Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i

Example

Let's look at some Oracle ASCIISTR function examples and explore how to use the ASCIISTR function in Oracle/PLSQL.

For example:

ASCIISTR('A B C Ä Ê')
Result: 'A B C \00C4 \00CA'

ASCIISTR('A B C Õ Ø')
Result: 'A B C \00D5 \00D8'

ASCIISTR('A B C Ä Ê Í Õ Ø')
Result: 'A B C \00C4 \00CA \00CD \00D5 \00D8'