SYSSEQUENCES catalog table

The SYSSEQUENCES table contains one row for each identity column or user-defined sequence. The schema is SYSIBM.

Table 1. SYSIBM.SYSSEQUENCES table column descriptions
Column name Data type Description Use
SCHEMA
VARCHAR(128)
NOT NULL
Schema of the alias or sequence. For an identity column, the value of TBCREATOR from the SYSCOLUMNS entry for the column. G
OWNER
VARCHAR(128)
NOT NULL
Owner of the alias or sequence. For an identity column, the value of TBCREATOR from the SYSCOLUMNS entry for the column. G
NAME
VARCHAR(128)
NOT NULL
Name of the alias, identity column, or sequence. The name for an identity column is generated by Db2. G
SEQTYPE
CHAR(1)
NOT NULL
Type of sequence object:
A
Alias for a sequence
I
An identity column
S
A user-defined sequence
X
An implicitly created DOCID column for a base table that contains XML data.
G
SEQUENCEID
INTEGER
NOT NULL
Internal identifier of the alias, identity column, or sequence. G
CREATEDBY
VARCHAR(128)
NOT NULL
Primary authorization ID of the user who created the alias, identity column, or sequence. G
INCREMENT
DECIMAL(31,0)
NOT NULL
Increment value (positive or negative, within INTEGER scope).

The value is 0 if the row describes an alias.

G
START
DECIMAL(31,0)
NOT NULL
Start value.

The value is 0 if the row describes an alias.

G
MAXVALUE
DECIMAL(31,0)
NOT NULL
Maximum value allowed for the identity column or sequence.

The value is 0 if the row describes an alias.

G
MINVALUE
DECIMAL(31,0)
NOT NULL
Minimum value allowed for the identity column or sequence.

The value is 0 if the row describes an alias.

G
CYCLE
CHAR(1)
NOT NULL
Whether cycling will occur when a boundary is reached:
N
No
Y
Yes, cycling will occur
blank
The row describes an alias
G
CACHE
INTEGER
NOT NULL
Number of sequence values to preallocate in memory for faster access. A value of 0 indicates that values are not to be preallocated.

The value is 0 if the row describes an alias.

G
ORDER
CHAR(1)
NOT NULL
Whether the values must be generated in order:
Y
Yes
N
No
R
The values must be generated in pseudo-random order for an XML document ID column that was created when subsystem parameter XML_RANDOMIZE_DOCID was set to YES.
blank
The row describes an alias
G
DATATYPEID
INTEGER
NOT NULL
For a built-in data type, the internal ID of the built-in type. For a distinct type, the internal ID of the distinct type.

The value is 0 if the row describes an alias.

S
SOURCETYPEID
INTEGER
NOT NULL
For a built-in data type, 0. For a distinct type, the internal ID of the built-in data type upon which the distinct type is based.

The value is 0 if the row describes an alias.

S
CREATEDTS
TIMESTAMP
NOT NULL
Timestamp of the creation of the alias, identity column, or sequence. G
ALTEREDTS
TIMESTAMP
NOT NULL
Timestamp when the last ALTER statement was executed for this alias, identity column, or sequence. G
MAXASSIGNEDVAL
DECIMAL(31,0)
Last possible assigned value. MAXASSIGNEDVAL is updated each time that the next chunk of n values is cached. n is the CACHE column value. MAXASSIGNEDVAL is initialized to null when the object is created or when it is altered to restart the sequence. The value is also null when the object is an alias.

Start of changeThe LOAD utility updates MAXASSIGNEDVAL for identity columns in the following ways:End of change

Start of change
  • For sequence or identity column values that are generated by the Db2 database manager, LOAD updates MAXASSIGNEDVAL each time that the next chunk of n values is cached. n is the CACHE column value.
  • For identity column values that are generated by the user, LOAD updates MAXASSIGNEDVAL with the MAXVALUE column value or MINVALUE column value. MAXVALUE is used if the INCREMENT column value is positive. MINVALUE is used if the INCREMENT column value is negative.
  • LOAD with REPLACE sets MAXASSIGNEDVAL to null before loading any data.
  • LOAD with FORMAT INTERNAL does not update MAXASSIGNEDVAL if the data that is being loaded is in basic row format.
End of change

The value is 0 if the row describes an alias.

G
IBMREQD
CHAR(1)
NOT NULL
A value of Y indicates that the row was provided with the Db2 product code. For all other values, see Release dependency indicators.

The value in this field is not a reliable indicator of release dependencies. RELCREATED should be used instead.

G
REMARKS
VARCHAR(762)
NOT NULL
Character string provided by user with the COMMENT statement. The value is blank for an identity column. G
PRECISION
SMALLINT
NOT NULL WITH
DEFAULT
The precision defined for a sequence with a decimal or numeric type. The value is 5 for SMALLINT, 10 for INTEGER, 19 for BIGINT, or the actual precision specified by the user for the decimal data type. The value is 0 for rows created prior to Version 8.

The value is 0 if the row describes an alias.

G
RESTARTWITH
DECIMAL(31,0)
NULLABLE WITH
DEFAULT
The sequence RESTART value for an ALTER SEQUENCE statement.
The value is NULL for the following:
  • There have been no ALTER statements with the RESTART option.
  • The row describes an alias
G
OWNERTYPE
CHAR(1)
NOT NULL WITH
DEFAULT
Indicates the type of owner:
blank
Authorization ID
L
Role
G
RELCREATED
CHAR(1)
NOT NULL
The release of Db2 that is used to create the object. Blank if created prior to Version 9. See Release dependency indicators for all other values. G
SEQSCHEMA
VARCHAR(128)
NOT NULL WITH
DEFAULT
Start of changeFor a sequence alias, identifies the schema of the sequence for which the alias is defined. Otherwise, the value is blank.End of change G
SEQNAME
VARCHAR(128)
NOT NULL WITH
DEFAULT
Start of changeFor a sequence alias, identifies the name of the sequence for which the alias is defined. Otherwise, the value is blank.End of change G