Contents Index SYSCOLSTAT system table SYSCONSTRAINT system table

ASA SQL Reference
  System Tables

SYSCOLUMN system table


Column name Column type Column constraint Table constraints
table_id UNSIGNED INT NOT NULL Primary key, foreign key references SYSTABLE.table_id
column_id UNSIGNED INT NOT NULL Primary key
pkey CHAR(1) NOT NULL
domain_id SMALLINT NOT NULL foreign key references SYSDOMAIN.domain_id
nulls CHAR(1) NOT NULL
width SMALLINT NOT NULL
scale SMALLINT NOT NULL
unused INTEGER NOT NULL
max_identity BIGINT NOT NULL
column_name CHAR(128) NOT NULL
remarks LONG VARCHAR
"default" LONG VARCHAR
"check" LONG VARCHAR
user_type SMALLINT Foreign key references SYSUSERTYPE.type_id
format_str CHAR(128)
column_type CHAR(1) NOT NULL
remote_name VARCHAR(128)
remote_type UNSIGNED INT

Each column in every table or view is described by one row in SYSCOLUMN.

table_id    A number that uniquely identifies the table or view to which this column belongs.

column_id    Each table starts numbering columns at 1. The order of column numbers determines the order that columns are displayed in the command

SELECT * FROM TABLE

pkey (Y/N)    Indicate whether this column is part of the primary key for the table.

domain_id    The data type for the column, indicated by a data type number listed in the SYSDOMAIN table.

nulls (Y/N)    Indicates whether the NULL value is allowed in this column.

width    The length of a string column, the precision of numeric columns or the number of bytes of storage for any other data type.

scale    The number of digits after the decimal point for numeric data type columns, and zero for all other data types.

unused    Not used.

max_identity    The largest value of the column, if it is an AUTOINCREMENT, IDENTITY, or GLOBAL AUTOINCREMENT column.

column_name    The name of the column.

remarks    A comment string.

default    The default value for the column. This value is only used when an INSERT statement does not specify a value for the column.

check    Any CHECK condition defined on the column.

user_type    If the column is defined on a user-defined data type, the data type is held here.

format_str    Currently unused.

column_type    The type of column. Contains C for a computed column and R for other columns.

remote_name    The name of the remote column.

remote_type    The type of the remote column. This value is defined by the remote server or interface.


Contents Index SYSCOLSTAT system table SYSCONSTRAINT system table