Home | Previous Page | Next Page   The Table Option > Displaying Table Information >

Displaying Column Information

Use the Columns option on the INFO menu to display the following information for each column of the specified table: the name of the column, the data type of the column, and whether null values are allowed in the column.

Figure 88 shows the kind of information that you see when you select the Columns option for the cust_calls table.

Figure 88. Displaying Column Information for the cust_calls Table
Column name         Type                               Nulls

customer_num        INTEGER                            no
call_dtime          DATETIME YEAR TO MINUTE            yes
user_id             CHAR(32)                           yes
call_code           CHAR(1)                            yes
call_descr          CHAR(240)                          yes
res_dtime           DATETIME YEAR TO MINUTE            yes
res_descr           CHAR(240)                          yes

DB-Access Data Types

The columns in Figure 88 show that the cust_calls table consists of all built-in (standard) data types. The data types available through the CREATE TABLE menu hierarchy are built-in types.

The built-in types that the Columns option can display are BOOLEAN, BYTE, CHAR, CHARACTER VARYING, DATE, DATETIME, DECIMAL, FLOAT, INT8, INTEGER, INTERVAL, MONEY, NCHAR, NVARCHAR, SERIAL, SERIAL8, SMALLFLOAT, SMALLINT, TEXT, VARCHAR, and user-defined types.

For descriptions of these data types, see the IBM Informix: Guide to SQL Reference.

Figure 89 shows the display of column information for a table that has BOOLEAN, INT8, and SERIAL8 columns as well as other built-in data types.

Figure 89. Displaying Column Information for a Table with Several Built-in Types
Column name           Type                           Nulls

id_num               integer                         yes
yes_or_no            boolean                         yes
int8col              int8                            yes
serial8col           serial8                         yes
text_descr           char(20)                        yes
Large Objects

Large objects are built-in data types that store a large amount of data in a single column. Within a table, large-object data type columns actually contain pointers to the physical storage spaces where the database server places the large data objects.

DB–Access can display any of the following large-object data types:

The Columns option displays the specific data type for any column that contains pointers to large objects. Figure 90 shows the display of column information for a table that has a BYTE column.

Figure 90. Displaying Column Information for a BLOB Column
Column name          Type                           Nulls

id                   integer                        yes
binary_col           byte                           yes

Extended Data Types in Dynamic Server

This section shows how DB–Access displays user-defined and complex data types for Dynamic Server.

Opaque Data Types

An opaque data type characterizes data that cannot be represented by any of the built-in types that belong to the database server. DB–Access can identify and display opaque data types.

For example, suppose you assign an opaque data type called circle_t to a column named circle_col. The Columns option displays the opaque data type name in the Type column, as Figure 91 shows.

Figure 91. Displaying Information for a Column with an Opaque Data Type
Column name        Type                              Nulls

id                 integer                           yes
circle_col         circle_t                          yes
Collection Types

A collection type contains zero or more elements and is more specifically defined with one of the following data type names.

Data Type
Characteristics
SET
An unordered collection of elements in which duplicates are not allowed
MULTISET
An unordered collection of elements in which duplicates are allowed
LIST
An ordered collection of elements in which duplicates are allowed

DB–Access displays the specific kind of collection type in the Type column. For example, Figure 92 shows the display of a SET data type column named siblings.

Figure 92. Displaying Information for a Column with a Collection Data Type
Column name          Type                           Nulls

id                   integer                        yes
siblings             set                            yes
Row Types

The Columns option for a table that includes a column with a row type displays the string Row in the Type column. DB–Access displays this string whether the column has a named or unnamed row type. Assume you define row type rectangle_t and assign it to column rect. Figure 93 shows that the Columns display for rect returns row rather than the specific row-type name rectangle_t as the data type.

Figure 93. Column Information for a Row Data Type
Column name          Type                           Nulls

id                   integer                        yes
rect                 row                            yes
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]