Using SHOW Statements
SHOW statements return the result of the last data definition statement performed against the named database object in the form of a CREATE database_object or ALTER database_object statement.
These statements are particularly useful for application developers who need to develop exact replicas of existing tables, views, join indexes, stored procedures, user-defined functions, or macros for purposes of testing new software.
SHOW statements can return database object definition SQL text in XML format.
CHARACTER SET Support for SHOW Requests
Depending on the language support in use for the system, Vantage produces SHOW request reports using different character sets, as in the following table.
| Language Support | SHOW Request Output Server CHARACTER SET |
|---|---|
| Standard. | LATIN |
| Japanese with multibyte site-defined character set. | UNICODE |
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.
- If YEN SIGN (U+00A5) or WON SIGN (U+20A9) replaces BACKSLASH in the session character set, the system uses the replacement character 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. See Object Names for details.
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 (the table is on the Block File System):
CREATE SET TABLE U&"\4E00" UESCAPE '\' ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO
(
i INTEGER)
PRIMARY INDEX ( i );