15.00 - Unprintable Characters in Object Names and Literals Returned by SHOW - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

Unprintable Characters in Object Names and Literals Returned by SHOW

If an object name or literal returned by a SHOW request includes a character not in the repertoire of the session character set, or is otherwise unprintable, the name or literal is shown as a UNICODE delimited identifier or literal.

Each non-representable character is escaped to its hexadecimal equivalent.

The escape character used by the system is determined by the setting of the EnableEON flag:

The system uses BACKSLASH (U+005C), if it is available, as the escape character. If BACKSLASH is not available:

  • If either YEN SIGN (U+00A5) or WON SIGN (U+20A9) replaces BACKSLASH in the session character set, the system uses it as the escape character.
  • If none of the preceding characters is available, the system uses NUMBER SIGN (U+0023).
  • For example:

    create table u&"#4E00" uescape'#' (i int);
     
    show table u&"#4E00" uescape'#';

    Object names that are translatable to the session character set, but are not lexically distinguishable as names are enclosed in double quotation marks.

    For information on object naming, see SQL Fundamentals.

    Using SHOW Output with Escape Characters in an SQL Statement

    You can use SHOW output containing escape characters in another SQL statement. For example, using the SHOW output from the previous topic:

    CREATE SET TABLE U&"\4E00" UESCAPE '\' ,NO FALLBACK ,
         NO BEFORE JOURNAL,
         NO AFTER JOURNAL,
         CHECKSUM = DEFAULT,
         DEFAULT MERGEBLOCKRATIO
         (
          i INTEGER)
    PRIMARY INDEX ( i );