This article is written about how to use the Oracle/PLSQL COMPOSE function with syntax and examples.
Description
The Oracle/PLSQL COMPOSE function returns a Unicode string.
Syntax
The syntax for the COMPOSE function in Oracle/PLSQL is:
COMPOSE( string )
Parameters or Arguments
string
The input value used to create the Unicode string. It can be a char, varchar2, nchar, nvarchar2, clob, or nclob.
Returns
The COMPOSE function returns a Unicode string.
Below is a listing of unistring values that can be combined with other characters in the compose function.
Unistring Value Resulting character
unistr(‘\0300’) grave accent ( ` )
unistr(‘\0301’) acute accent ( ´ )
unistr(‘\0302’) circumflex ( ^ )
unistr(‘\0303’) tilde ( ~ )
unistr(‘\0308’) umlaut ( ¨ )
Applies To
The COMPOSE 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 COMPOSE function examples and explore how to use the COMPOSE function in Oracle/PLSQL.
For example:
COMPOSE('o' || unistr('\0308') )
Result: ö
COMPOSE('a' || unistr('\0302') )
Result: â
COMPOSE('e' || unistr('\0301') )
Result: é
Leave a Review