Create Table Wizard - Table Information and Columns
Use this page to specify basic table information and to define the columns for a new database table or external table. External tables are used to load and unload data for your database.
Prerequisite: To
create external tables, the OpenAdmin Tool (OAT) for Informix® requires IBM®
Informix 11.50.xC6
or later.
Table Information
Provide the following information for the table.
- Table name
- Type a name for the table that is unique among the names of tables, synonyms, views, and sequences in the database. The name must follow the guidelines of SQL syntax for an identifier.
- Table owner
- Specify the owner of the table. The default is user informix.
- Table type
- Select the type of table:
- Standard: A logging table (default).
- Raw: A nonlogging table.
- External Delimited: A table in delimited text format whose data is managed and stored outside of the Informix database server.
- External Fixed: A table in fixed-width text format whose data is managed and stored outside of the Informix database server.
- External Informix: A table in internal Informix format whose data is managed and stored outside of the Informix database server.
- Create the table the same as
- For external delimited tables, select this option to create the external table with the same schema as an existing table. Then select the existing table from the list. When this option is selected, the columns are defined by the existing table, so the Table Columns list is not displayed.
Table Columns
To add a column to the table, click Add.
The list displays the following information about the columns in the table:
- Column Name
- Data Type: The data type of the column, such as CHAR or DECIMAL.
- Attributes: The attributes for the column. The attributes depend on the data type of the column; for example, Length for CHAR.
- Check Constraint: An indicator of whether there is a check constraint on the column.
- Allow Nulls: An indicator of whether the column allows nulls.
- Default Value
- Table check constraint
- Select this option to add a check constraint to the table. Type the check constraint in the text box. For example, colName1 <= colName2.
Column
Use this page to add a column to the table, or to edit a column.
- Column name
- Type a name for the column that is unique in this table. The name must follow the guidelines of SQL syntax for an identifier.
- Allow null values
- Select this option to allow this column to contain a null value. A null value means that the value for the column can be unknown or not applicable.
- Data type
- Specify the data type of the column. Then specify the attributes that are displayed for the selected data type.
- The following data types are available in the wizard:
- Character data types: CHAR, LVARCHAR, NCHAR, NVARCHAR, VARCHAR. The attribute for the character data types is length.
- Numeric data types: BIGINT, BIGSERIAL (start value), DECIMAL (precision, scale), FLOAT, INTEGER, MONEY (precision, scale), SERIAL (start value), SMALLINT, SMALLFLOAT.
- Large-object data types: BLOB, BYTE, CLOB, TEXT. The attributes for BLOB and CLOB are the storage location and extent size, and the options for logging, recording access time, and data integrity. The attribute for BYTE and TEXT is the storage location. The BLOB and CLOB data types are not available for external tables in fixed-width text format or Informix format.
- Time data types: DATE, DATETIME (largest time unit, smallest time unit, scale), INTERVAL (largest time unit, smallest time unit, precision).
- BOOLEAN data type.
- Row and collection data types: LIST, MULTISET, named ROW, SET.
- These data types are not available in the wizard:
- DataBlade data types
- DISTINCT
- IDSSECURITYLABEL
- INT8
- OPAQUE
- SERIAL8
- Unnamed ROW
- User-defined data types (UDTs)
- Default value
- Specify the default value for the column. The values that are allowed depend on the data type.
- Column constraint
- Select this option to add a check constraint to the column. Type the check constraint in the text box. For example, colName > value.
- External length
- For fixed-width external tables, specify the character length for the column.