How would you specify a specific Unicode codepoint in a Mimer SQL statement? Say you want to use the LEFT DOUBLE QUOTATION MARK (U+201C) and the RIGHT DOUBLE QUOTATION MARK (U+201D)?

The answer is to use the Unicode character string literal with escapes, which was standardized in SQL-2003 and supported by Mimer SQL since version 9.

With the escapes, a backslash initiates a four digit hexadecimal codepoint definition.

SQL>create table mytable (c1 integer);
SQL>insert into mytable values (1);
SQL>select c1,U&'\201CNew York\201D' from mytable;
         c1
=========== ==========
          1 “New York”

                  1 row found

The above is sufficient for all Unicode Basic Multilingual Plane characters. For other characters, whose codepoint values exceed 0xffff, the 6-digit escape is used. In the below example the Musical symbol G-Clef is used:

SQL>select c1,U&'\+01D11E' from mytable;
         c1
=========== =
          1 𝄞

                  1 row found