DB2 Version 9.7 for Linux, UNIX, and Windows

SYSCAT.SEQUENCES catalog view

Each row represents a sequence or alias.

Table 1. SYSCAT.SEQUENCES Catalog View
Column Name Data Type Nullable Description
SEQSCHEMA VARCHAR (128)   Schema name of the sequence.
SEQNAME VARCHAR (128)   Unqualified name of the sequence.
DEFINER1 VARCHAR (128)   Authorization ID of the owner of the sequence.
DEFINERTYPE CHAR (1)  
  • S = The definer is the system
  • U = The definer is an individual user
OWNER VARCHAR (128)   Authorization ID of the owner of the sequence.
OWNERTYPE CHAR (1)  
  • S = The owner is the system
  • U = The owner is an individual user
SEQID INTEGER   Identifier for the sequence or alias.
SEQTYPE CHAR (1)   Type of sequence.
  • A = Alias
  • I = Identity sequence
  • S = Sequence
BASE_SEQSCHEMA VARCHAR (128) Y If SEQTYPE is 'A', contains the schema name of the sequence or alias that is referenced by this alias; the null value otherwise.
BASE_SEQNAME VARCHAR (128) Y If SEQTYPE is 'A', contains the unqualified name of the sequence or alias that is referenced by this alias; the null value otherwise.
INCREMENT DECIMAL (31,0) Y Increment value. The null value if the sequence is an alias.
START DECIMAL (31,0) Y Start value of the sequence. The null value if the sequence is an alias.
MAXVALUE DECIMAL (31,0) Y Maximum value of the sequence. The null value if the sequence is an alias.
MINVALUE DECIMAL (31,0) Y Minimum value of the sequence. The null value if the sequence is an alias.
NEXTCACHEFIRSTVALUE DECIMAL (31,0) Y The first value available to be assigned in the next cache block. If no caching, the next value available to be assigned.
CYCLE CHAR (1)   Indicates whether or not the sequence can continue to generate values after reaching its maximum or minimum value.
  • N = Sequence cannot cycle
  • Y = Sequence can cycle
  • Blank = Sequence is an alias.
CACHE INTEGER   Number of sequence values to pre-allocate in memory for faster access. 0 indicates that values of the sequence are not to be preallocated. In a partitioned database, this value applies to each database partition. -1 if the sequence is an alias.
ORDER CHAR (1)   Indicates whether or not the sequence numbers must be generated in order of request.
  • N = Sequence numbers are not required to be generated in order of request
  • Y = Sequence numbers must be generated in order of request
  • Blank = Sequence is an alias.
DATATYPEID INTEGER   For built-in types, the internal identifier of the built-in type. For distinct types, the internal identifier of the distinct type. 0 if the sequence is an alias.
SOURCETYPEID INTEGER   For a built-in type or if the sequence is an alias, this has a value of 0. For a distinct type, this is the internal identifier of the built-in type that is the source type for the distinct type.
CREATE_TIME TIMESTAMP   Time at which the sequence was created.
ALTER_TIME TIMESTAMP   Time at which the sequence was last altered.
PRECISION SMALLINT   Precision of the data type of the sequence. Possible values are:
  • 5 = SMALLINT
  • 10 = INTEGER
  • 19 = BIGINT
For DECIMAL, it is the precision of the specified DECIMAL data type. 0 if the sequence is an alias.
ORIGIN CHAR (1)   Origin of the sequence.
  • S = System-generated sequence
  • U = User-generated sequence
REMARKS VARCHAR (254) Y User-provided comments, or the null value.
Note:
  1. The DEFINER column is included for backwards compatibility. See OWNER.