SYS_COLUMNS

SYS_COLUMNS contains information about column names, data types, and their order within a table.

Column name Data type Description
TABLE_CATALOG VARCHAR(128) A top-level container for tables.
Not used. Always NULL.
TABLE_SCHEMA VARCHAR(128) A second-level container for tables.
Not used. Always NULL.
TABLE_NAME VARCHAR(128) The name of the object to which the field belongs.
COLUMN_NAME VARCHAR(128) The name of the object field.
ORDINAL_POSITION INT The position of the field in the object.
COLUMN_DEFAULT TEXT The default value for the field.
IS_NULLABLE VARCHAR(3) Specifies whether the field can be NULL (YES) or not (NO).
DATA_TYPE VARCHAR(128) The data type of the field.
CHARACTER_MAXIMUM_LENGTH INT The maximum length of the character or binary data that the field can contain in characters.
CHARACTER_OCTET_LENGTH INT The maximum length of the character or binary data that the field can contain in bytes.
NUMERIC_PRECISION INT The precision of numeric data.
NUMERIC_PRECISION_RADIX INT The precision radix of numeric data.
NUMERIC_SCALE INT The scale of numeric data.
DATETIME_PRECISION INT Not used. Always NULL.
CHARACTER_SET_CATALOG VARCHAR(128) Not used. Always NULL.
CHARACTER_SET_SCHEMA VARCHAR(128) Not used. Always NULL.
CHARACTER_SET_NAME VARCHAR(128) Not used. Always NULL.
COLLATION_CATALOG VARCHAR(128) Not used. Always NULL.
COLLATION_SCHEMA VARCHAR(10) Not used. Always NULL.
COLLATION_NAME VARCHAR(128) Not used. Always NULL.
DOMAIN_CATALOG VARCHAR(128) Not used. Always NULL.
DOMAIN_SCHEMA VARCHAR(128) Not used. Always NULL.
DOMAIN_NAME VARCHAR(128) Not used. Always NULL.
ALLOWED_OPERATIONS INT Specifies which DML operations are allowed on this object.
The value is the sum of the following flags:
  • 0 – None of the DML operations are allowed.
  • 1 – INSERT operations are allowed.
  • 2 – UPDATE operations are allowed.
HAS_DEFAULT BIT Specifies whether the field has the default value (1) or not (0).
IS_COMPUTED BIT Specifies whether the field is computed (1) or not (0).
IS_UNIQUE BIT Specifies whether the field must have unique values (1) or not (0).
DB_TYPE INT The numeric representation of the DbType value.
NATIVE_TYPE INT For internal usage.
API_NAME VARCHAR(128) The original name of the column, as generated by Dynamics 365.