Oracle COMPOSE Function

Oracle COMPOSE FunctionOracle 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 ‘ê’


Tagged , , , , , , , , , , , . Bookmark the permalink.
  • Nice read, I just passed this onto a friend who was doing some research on that. And he actually bought me lunch since I found it for him smile So let me rephrase that: Thank you for lunch!

  • Its such as you learn my mind! You appear to understand so much approximately this, such as you wrote the ebook in it or something. I think that you could do with a few percent to force the message home a little bit, however instead of that, that is fantastic blog. A fantastic read. I will definitely be back.