CREATE TABLE SYS.SYSCOLUMN ( table_id UNSIGNED INT NOT NULL, column_id UNSIGNED INT NOT NULL, pkey CHAR(1) NOT NULL, domain_id SMALLINT NOT NULL, nulls CHAR(1) NOT NULL, width SMALLINT NOT NULL, scale SMALLINT NOT NULL, estimate INT 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, format_str CHAR(128), column_type CHAR(1) NOT NULL, remote_name VARCHAR(128), remote_type UNSIGNED INT, PRIMARY KEY ( table_id, column_id ), FOREIGN KEY REFERENCES SYS.SYSTABLE, FOREIGN KEY REFERENCES SYS.SYSDOMAIN FOREIGN KEY REFERENCES SYS.SYSUSERTYPE )
Each column in every table or view is described by one row in SYSCOLUMN.
table_id The table number 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 Indicates whether this column is part of the primary key for the table (Y or N).
domain_id Identify the data type for the column by the data type number listed in the SYSDOMAIN table.
nulls Indicates whether the NULL value is allowed in this column (Y or N).
width This column contains the length of string columns, the precision of numeric columns, and the number of bytes of storage for all other data types.
scale The number of digits after the decimal point for numeric data type columns, and zero for all other data types.
estimate A self-tuning parameter for the optimizer. Sybase IQ will learn from previous queries by adjusting guesses that are made by the optimizer.
max_identity The largest value of the column, if it is an AUTOINCREMENT, IDENTITY, or GLOBAL AUTOINCREMENT column. Sybase IQ does not support IDENTITY columns.
column_name The name of the column.
“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.
The “default” value and “check” condition features are not currently supported by Sybase IQ.
user_type If the column is defined on a user-defined data type, the data type is held here.
column_type The type of column.
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.