Oracle COMPOSE Function is used to get the Unicode string.Oracle COMPOSE Function is used with the SQL SELECT Statement.
Oracle COMPOSE Function Syntax
SELECT COMPOSE (string) FROM table_name;
string is the input for the COMPOSE function and is used to create the Unicode string and it can be CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB or NCLOB type.
Table below shows Uni-string values that can combine with other characters via Oracle COMPOSE Function.
Unistring Values | Resulting character |
UNISTR(‘\0300’) | grave accent ( ` ) |
UNISTR(‘\0301’) | acute accent ( ´ ) |
UNISTR(‘\0302’) | circumflex ( ^ ) |
UNISTR(‘\0303’) | tilde ( ~ ) |
UNISTR(‘\0308’) | umlaut ( ¨ ) |
UNISTR(‘\0300’) | grave accent ( ` ) |
UNISTR(‘\0301’) | acute accent ( ´ ) |
UNISTR(‘\0302’) | circumflex ( ^ ) |
Oracle COMPOSE Function – Combining with Uni-string Examples
Oracle COMPOSE Function examples below show combining Uni-String values with other characters.
For example, the below SQL query returns combination of ‘a’ with UNISTR(‘\0308’).
SELECT COMPOSE('a' || UNISTR('\0308')) FROM dual;
Will return ‘ä’
For example, the below SQL query returns combination of ‘e’ with UNISTR(‘\0300’).
SELECT COMPOSE('e' || UNISTR('\0300')) FROM dual;
Will return ‘è’
For example, the below SQL query returns combination of ‘e’ with UNISTR(‘\0302’).
SELECT COMPOSE('e' || UNISTR('\0302')) FROM dual;
Will return ‘ê’