DECLARE TABLE is not an executable statement. It can only be embedded in an application language.
This command is supported only syntactically.
DECLARE {table-name | view-name}
TABLE (column-name {built-in-data-type | distinct-type-name}
[NOT NULL]
[NOT NULL WITH DEFAULT] [,...])
This command is supported only syntactically.
DECLARE {table-name | view-name}
TABLE (column-name {built-in-data-type | distinct-type-name}
[NOT NULL]
[NOT NULL WITH DEFAULT] [,...])
table-name or view-name | Is the name of the table or view you want to document. If the table is defined in your application program, the description of the table in the SQL statement in which it is defined (for example, CREATE TABLE or DECLARE GLOBAL TEMPORARY TABLE statement) and the DECLARE TABLE statement must be identical. |
column-definition | One or more column definitions (separated by commas) can be chosen as specified below:
column-name data-type [NOT NULL] [NOT NULL WITH DEFAULT] |
Description
The XDB Server supports the DECLARE TABLE command syntactically only. The VALIDATE directive can be used to achieve the same functionality when precompiling. Use the Declaration Generator utility to generate declarations for tables and views. Mainframe DB2 users should use the DCLGEN utility.