All databases
syscolumns contains one row for every column in every table and view, and a row for each parameter in a procedure.
Contains one row for each computed column and function-based index key associated with a table.
The columns for syscolumns are:
Name |
Datatype |
Description |
---|---|---|
id |
int |
ID of table to which this column belongs, or of procedure with which this parameter is associated. |
number |
smallint |
Sub-procedure number when the procedure is grouped (0 for nonprocedure entries). |
colid |
smallint |
Column ID. |
status |
tinyint |
|
type |
tinyint |
Physical storage type; copied from systypes. |
length |
int |
Physical length of data; copied from systypes or supplied by user. |
offset |
smallint |
Offset into the row where this column appears; if negative, this is a variable-length column. |
usertype |
smallint |
User type ID; copied from systypes. |
cdefault |
int |
ID of the procedure that generates default value for this column. |
domain |
int |
Constraint ID of the first rule or check constraint for this column. |
name |
varchar(255) not null |
Column name |
printfmt |
varchar(255) null |
Reserved |
prec |
tinyint null |
Number of significant digits, if the column uses the numeric datatype. |
scale |
tinyint null |
Number of digits to the right of the decimal point, if the column uses the numeric datatype. |
remote_type |
int null |
Maps local names to remote names. Required by the access methods of Component Integration Services to allow the software to pass native column datatype information in parameters to servers of class access_server. |
remote_name |
varchar(255) null |
Maps local names to remote names. Required by the access methods of Component Integration Services to construct a query using the proper column names for a remote table. |
xstatus |
int null |
The status of a column with extended datatypes. The values are:
xstatus is NULL for columns that do not have an extended datatype. |
xtype |
int null |
ID of the class. Used if a column in a table or a parameter in a procedure has a Java class as its datatype. When used, fields are not NULL, and the value of type is 0x39. See Java in Adaptive Server Enterprise for more information. |
xdbid |
int null |
The database ID of the class. For system classes, the value is -1. Otherwise, the value is the current database ID. Used if a column in a table or a parameter in a procedure has a Java class as its datatype. Fields are not NULL, and the value of type is 0x39. See Java in Adaptive Server Enterprise for more information. |
accessrule |
int null |
The object ID of the access rule in sysprocedures. See “Row-level access control“ in Chapter 11, “Managing User Permissions” of the System Administration Guide for more information. |
status2 |
int null |
Indicates parameter mode of a SQLJ stored procedure, and the return type of a SQLJ function. Three internal bits support computed columns:
The status2 field from syscolumns uses this encoding to indicate a column’s encryption properties:
|
status3 |
int |
0x0001, value 1 – Indicates a hidden computed column for a function-based index key. |
computedcol |
int |
Stores the object ID of the computed column definition. |
encrtype |
int null |
Type of data in encrypted form. |
encrlen |
int null |
Length of encrypted data. |
encrykeyid |
int null |
Object ID of key. |
encrykeydb |
varchar(30) null |
Name of the database where the encryption key was created; NULL if it is in the same database as the encrypted column |
encrdate |
datetime null |
Creation date of encryption key; copied from sysobjects.crdate. |
Unique clustered index on id, number, colid