Entering content frame

Object documentation COLUMNS Locate the document in the library structure

Definition

The system table COLUMNS contains the columns of all the tables, view tables, results tables, and synonyms for which the current user has privileges.

Structure

COLUMNS

SCHEMANAME

CHAR(32)

Name of the schema of the database object

OWNER

CHAR(32)

Name of the owner of the database object

TABLENAME

CHAR(32)

Name of the database object

COLUMNNAME

CHAR(32)

Name of the column

MODE

CHAR(3)

Type of column (KEY | MAN | OPT)

DATATYPE

CHAR(10)

Data type of the column (BOOLEAN | CHAR | DATE | FIXED | FLOAT | INTEGER | LONG | SMALLINT | TIME | TIMESTAMP)

CODETYPE

CHAR(8)

Code attribute of column (ASCII | BYTE | UNICODE)

LEN

FIXED(4)

Length or precision of the column

DEC

FIXED(3)

Number of decimal places in the columns of data type FIXED

NULLABLE

CHAR(3)

Column can accept NULL value (YES | NO)

COLUMNPRIVILEGES

CHAR(8)

Privileges of the current user for the column

DEFAULT

CHAR(254)

DEFAULT value for the column

DEFAULTFUNCTION

CHAR(12)

Name, if the DEFAULT value is one of the following value specifications:
NULL | USER | USERGROUP | SYSDBA | UID | DATE | TIME | TIMESTAMP | UTCDATE | TIMEZONE | UTCDIFF | TRUE | FALSE | TRANSACTION
Otherwise NULL value

DOMAINOWNER

CHAR(32)

Name of the domain owner used for column definition

DOMAINNAME

CHAR(32)

Name of the domain used for column definition

POS

FIXED(4)

Original position of the column in the table

KEYPOS

FIXED(4)

Original position of the key column in the table

PHYSICALPOS

FIXED(4)

Position of column on disk

CREATEDATE

DATE(10)

Creation date of the column

CREATETIME

TIME(8)

Creation time of the column

ALTERDATE

DATE(10)

Alter date of the column

ALTERTIME

TIME(8)

Alter time of the column

TABLETYPE

CHAR(8)

Type of table (TABLE | VIEW | SYNONYM | RESULT | SYSTEM)

COMMENT

LONG

Comment on the column

See also:

Evaluating System Tables, COLUMNS

SQL Reference Manual, Data Type (data_type)

 

Leaving content frame