Home | Previous Page | Next Page   System Catalog Tables >

SYSCOLUMNS

The syscolumns system catalog table describes each column in the database. One row exists for each column that is defined in a table or view.

Column Type Explanation
colname VARCHAR(128) Column name
tabid INTEGER Identifying code of table containing the column
colno SMALLINT Column number

The system sequentially assigns this (from left to right within each table).

coltype SMALLINT Code indicating the data type of the column:
0 = CHAR
1 = SMALLINT
2 = INTEGE R
3 = FLOAT
4 = SMALLFLOAT
5 = DECIMAL
6 = SERIAL *
7 = DATE
8 = MONEY
9 = NULL
10 = DATETIME
11 = BYTE
12 = TEXT
13 = VARCHAR
14 = INTERVAL
15 = NCHAR
16 = NVARCHAR
17 = INT8
18 = SERIAL8 *
19 = SET
20 = MULTISET
21 = LIST
22 = Unnamed ROW
40 = Variable-length
opaque type
4118 = Named ROW
collength SMALLINT Column length (in bytes)
colmin INTEGER Minimum column length (in bytes)
colmax INTEGER Maximum column length (in bytes)
extended_id
(IDS)
INTEGER Data type code, from the sysxtdtypes table, of the data type specified in the coltype column
* In DB–Access, an offset value of 256 is always added to these coltype codes
because DB–Access sets SERIAL and SERIAL8 columns to NOT NULL.

Extended Parallel Server does not support opaque data types, nor the complex data types SET, MULTISET, LIST, unnamed and named ROW.

A composite index on tabid and colno allows only unique values.

The coltype codes listed on the previous page can be incremented by bitmaps showing the following features of the column.

Bit Value
Significance When Bit Is Set
0x0100
NULL values are not allowed
0x0200
Value is from a host variable
0x0400
Float-to-decimal for networked database server
0x0800
DISTINCT data type
0x1000
Named ROW type
0x2000
DISTINCT type from LVARCHAR base type
0x4000
DISTINCT type from BOOLEAN base type
0x8000
Collection is processed on client system

For example, the coltype value 4118 for named row types is the decimal representation of the hexadecimal value 0x1016, which is the same as the hexadecimal coltype value for an unnamed row type (0 x 016), with the named-row-type bit set. (The file $INFORMIXDIR/incl/esql/sqltypes.h contains additional information about syscolumns.coltype codes.)

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]