SYS.TABLES

The TABLES table stores information about the tables in the database, including the name, the owner, the number of columns, the size of a row and the primary key (if any). The TABLES table also stores information on system tables.

Specific column information is stored in the COLUMNS table.

Columns

Column name Type Description

TBLNAME

TT_CHAR(31) NOT NULL

Table name

TBLOWNER

TT_CHAR(31) NOT NULL

Name of user who owns the table

OWNER

TT_INTEGER NOT NULL

Owner identification

NUMVARY

TT_SMALLINT NOT NULL

Number of varying-length columns in table

NUMNULL

TT_SMALLINT NOT NULL

Number of nullable columns in table

NUMCOLS

TT_SMALLINT NOT NULL

Number of columns in table

LENGTH

TT_BIGINT NOT NULL

Length of inline portion of each row

NUMLOB

TT_SMALLINT NOT NULL

Number of LOB columns in the table

NUMCOMPRESS

TT_SMALLINT NOT NULL

Number of columns compressed in the table

TBLID

TT_BIGINT NOT NULL

TimesTen identifier for table

Matches SYS.COLUMNS.ID.

NUMTUPS

TT_BIGINT NOT NULL

Table cardinality

This value is precise only when no INSERT or DELETE transactions are active. The value includes uncommitted inserts, but not uncommitted deletes. Consequently, the value of this field may be larger than the actual table cardinality.

MAXTUPS

TT_BIGINT NOT NULL

Maximum table cardinality

PRIMCNT

TT_SMALLINT NOT NULL

Number of columns in primary key (0 if none)

PRIMCOLS

BINARY(64) NOT NULL

Array of two-byte integer column numbers of primary key, mapped to binary

CACHEFLAG

BINARY(1) NOT NULL

Internal use

PXLAFLAG

BINARY(1) NOT NULL

Persistent XLA status

If set, indicates that persistent XLA has been enabled for this particular user table.

NUMPTNS

TT_SMALLINT NOT NULL

Total number of partitions in a table.

CACHEGROUP

TT_BIGINT NOT NULL

ID of cache group that this table belongs to

This flag is nonzero if the table belongs to a cache group.

OCACHEGROUP

TT_BIGINT NOT NULL

Internal use

MVID

TT_BIGINT NOT NULL

If TBLNAME is a view: the ID of the associated row in the SYS.VIEWS system table

Otherwise, value 0

MVIDS

TT_VARCHAR(1024) NOT INLINE

If TBLNAME is a detail table: the ID of an array that contains the rowids in SYS.VIEWS that correspond to a materialized view that references the detail table

CGFKIDS

TT_VARCHAR(8192) NOT INLINE

Future use

PERMLTBLID

TT_BIGINT NOT NULL

The ID of the associated permanent table

CVVERSIONNUM

TT_INTEGER NOT NULL

Internal use

REPNUMKEYCOLS

TT_SMALLINT NOT NULL

Number of columns in the replication key described by REPKEYCOLS

REPTSCOLNUM

TT_SMALLINT NOT NULL

Column number of the column used for replication's timestamp-based conflict checking

REPRETURNSERVICE

TT_CHAR(1) NOT NULL

Return service for this subscriber with respect to this replication element

'C' - RETURN COMMIT

'R' - RETURN RECEIPT

'2' - RETURN TWOSAFE

'\0' - NO RETURN services

REPRETURNBYREQUEST

BINARY(1) NOT NULL

Status of return services

0 - Return services are provided unconditionally.

1 - Return services are provided only by request. This field is ignored if REPRETURNSERVICE = '\0'.

REPUSERID

TT_BIGINT NOT NULL

User-defined identifier for table (set with ttSetUserTableID built-in function)

REPKEYCOLS

BINARY(32) NOT NULL

Column numbers used by replication for unique identification of a row

Array of two-byte integers, mapped to binary.

REPACCESS

TT_CHAR(1) NOT NULL

The access restrictions imposed by replication

'-' - no access permitted

's'- may be read by read-only (SELECT) transactions

'r' -  may be read by updating transactions

'w' - may be updated

w => r and r => s.

REPTSUPDATERULE

TT_CHAR(1) NOT NULL

The rule for maintaining the TS_COLUMN for a timestamp-based conflict detector

'\0' - rule not defined

'U' - BY USER

'S' - BY SYSTEM (default)

CACHEDTBLPOS

TT_INTEGER NOT NULL

Future use

VALTBLIDS

VARBINARY(8000) NOT INLINE

If the table contains compressed columns: the ID of an array, containing the ID's of the corresponding dictionary tables

MAXROWKEYBATCH

BINARY (80) NOT NULL

Reserved for internal use

LASTROWKEY

TT_BIGINT NOT NULL

Reserved for internal use

HDISTCOLS

BINARY (64) NOT NULL

Reserved for internal use

HDISTCNT

TT_SMALLINT NOT NULL

Reserved for internal use

ROWKEYLEN

TT_TINYINT NOT NULL

Reserved for internal use

ROWKEYOFF

TT_INTEGER NOT NULL

Reserved for internal use

VERSIONOFF

TT_INTEGER NOT NULL

Reserved for internal use

VERSIONNBOFF

TT_INTEGER NOT NULL

Reserved for internal use

DISTRIBUTIONMODE

TT_INTEGER NOT NULL

Distribution scheme for a table in TimesTen Scaleout. Valid values are:

  • 0: System table

  • 4: Hash (Default)

  • 5: Duplicate

  • 6: Reference (1st level child)

  • 7: Reference (2nd level child or greater)

DISTRIBUTIONTAG

TT_CHAR (31)

Reserved for internal use

VERSIONNBMASK

TT_TINYINT NOT NULL

Reserved for internal use