UESCAPE

UESCAPE is an optional clause in SQL specific to Unicode string literals, which specifies the escape character for Unicode escape sequences. Its primary purpose is to allow specification of Unicode characters that cannot be conveniently input otherwise.

Example

SELECT E'\u0041' UESCAPE '\004';

Output

A

Explanation

In the provided SQL example, the UESCAPE clause is used along with the unicode escape character \u0041. The UESCAPE clause defines that \004 is to be used as an escape character. Here, it is used to denote that the text afterward is a specific Unicode value, which is ‘41’ in hex. In the Unicode character set, ‘41’ refers to the character ‘A’. Therefore, the example SQL query will effectively process \u0041 as the character ‘A’, which is then outputted by the query as shown.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.