Column definition

Use the Column Definition segment of the CREATE TEMP TABLE statement to declare the name and the data type (and optionally a default value and constraints) of a single column of the temporary table.

Read syntax diagramSkip visual syntax diagram
Column Definition

                         (1)   
|--column--| Data Type |---------------------------------------->

   .---------------------------------------------------.   
   V                                                   |   
>----+-----------------------------------------------+-+--------|
     |  (2)                     (3)                  |     
     +-------| DEFAULT Clause |----------------------+     
     |  (2)                                      (4) |     
     '-------| Single-Column Constraint Format |-----'     

Notes:
  1. See Data Type
  2. Use this path no more than once
  3. See DEFAULT clause of CREATE TABLE
  4. See Single-Column Constraint Format
Element Description Restrictions Syntax
column Name declared here for a column in the table Must be unique in its table Identifier
This portion of the CREATE TEMP TABLE statement resembles the corresponding syntax segment in the CREATE TABLE statement. The differences include these:
  • You cannot define a referential constraint on the column.
  • The data type cannot be IDSSECURITYLABEL.
  • The SECURED WITH label option is not supported for temporary tables.

Just as when you create permanent tables, any explicit or default storage size specification for a column of a built-in character type, such as CHAR, LVARCHAR, NCHAR, NVARCHAR, or VARCHAR, is interpreted in units of bytes, unless the SQL_LOGICAL_CHAR configuration parameter is set to enable logical character semantics for datatype declarations. See the IBM® Informix® Administrator's Reference for more information about the effect of the SQL_LOGICAL_CHAR setting in locales that support multibyte code sets, such as UTF-8, where a single logical character can require more than one byte of storage.


Copyright© 2018 HCL Technologies Limited