SYS.COLUMNS

The COLUMNS table describes every column in every table in the database, including the name of the column, the type of the column and whether the column is nullable.

Columns

Column name Type Description

ID

TT_BIGINT NOT NULL

Same as SYS.TABLES.TBLID of the table that owns the column

COLNUM

TT_SMALLINT NOT NULL

Ordinal number of the column as specified when the table is created or subsequently altered.

See also COLPOS in this table.

COLNAME

TT_CHAR(31) NOT NULL

Column name

COLOPTIONS

BINARY(1) NOT NULL

Column specification flags

0x01 - Column is in a primary key.

0x02 - Column value is varying-length (VARCHAR[2], NVARCHAR[2],VARBINARY).

0x04 - Column value can be NULL.

0x08 - Column values are unique.

COLTYPE

TT_TINYINT NOT NULL

Data type of column:

  •  1     TT_SMALLINT
  •  2     TT_INTEGER
  •  3     BINARY_FLOAT
  •  4     BINARY_DOUBLE
  •  5     TT_CHAR
  •  6     TT_VARCHAR
  •  7     BINARY
  •  8     VARBINARY
  • 12     TT_NCHAR
  • 13     TT_NVARCHAR
  • 14     TT_DATE
  • 15     TIME
  • 16     TT_TIMESTAMP
  • 20     TT_TINYINT
  • 21     TT_BIGINT
  • 22     TT_VARCHAR (inline)
  • 23     VARBINARY (inline)
  • 24     TT_NVARCHAR (inline)
  • 25     NUMBER
  • 26     CHAR
  • 27     VARCHAR2
  • 28     NCHAR
  • 29     NVARCHAR2
  • 30     DATE
  • 31     TIMESTAMP
  • 32     VARCHAR2 (inline)
  • 33     NVARCHAR2 (inline)
  • 34     ROWID
  • 36     CLOB
  • 37     NCLOB
  • 39     JSON

jsoTYPE_ATTR

TT_INTEGER NOT NULL

Internal use

COLLEN

TT_BIGINT NOT NULL

Length of the column (maximum length for varying-length columns)

INLINELEN

TT_BIGINT NOT NULL

Number of bytes a given column contributes to the inline width of a row

REPUSERID

TT_INTEGER NOT NULL

User-defined identifier for column (set with ttSetUserColumnID built-in procedure)

PTNNUM

TT_SMALLINT NOT NULL

The table partition that the column is in. The primary table partition has the value of 0. The ALTER TABLE...ADD COLUMN creates secondary table partitions with incrementing partitioning numbers. The total number of table partitions is stored in the NUMPTNS column of SYS.TABLES.

See ALTER TABLE in Oracle TimesTen In-Memory Database SQL Reference or SYS.TABLES for more information.

DEFAULTVALSTR

TT_VARCHAR(409600) NOT INLINE

The default column value

CHAR_USED

TT_CHAR(1)

Semantics for the column

'B' for BYTE

'C' for CHAR

NULL for non-character columns

DISTPOS

TT_SMALLINT NOT NULL

Internal use

COLPOS

TT_SMALLINT NOT NULL

Equal to the SYS.COLUMNS COLNUM column