SEQUENCES view

This Information Schema view displays a row for each sequence defined in the specified (or current) database.

Columns

Column NameData TypeDescription
SEQUENCE_CATALOGVARCHARDatabase that the sequence belongs to
SEQUENCE_SCHEMAVARCHARSchema that the sequence belongs to
SEQUENCE_NAMEVARCHARName of the sequence
SEQUENCE_OWNERVARCHARName of the role that owns the sequence
DATA_TYPEVARCHARData type of the sequence
NUMERIC_PRECISIONNUMBERNumeric precision of the data type of the sequence
NUMERIC_PRECISION_RADIXNUMBERRadix of the numeric precision of the data type of the sequence
NUMERIC_SCALENUMBERScale of the data type of the sequence
START_VALUEVARCHARInitial value of the sequence
MINIMUM_VALUEVARCHARNot applicable for Snowflake.
MAXIMUM_VALUEVARCHARNot applicable for Snowflake.
NEXT_VALUEVARCHARNext value that the sequence will produce
INCREMENTVARCHARIncrement of the sequence generator
CYCLE_OPTIONVARCHARNot applicable for Snowflake.
CREATEDTIMESTAMP_LTZCreation time of the sequence
LAST_ALTEREDTIMESTAMP_LTZDate and time the object was last altered by a DML, DDL, or background metadata operation. See Usage Notes.
ORDEREDVARCHARIf YES, the sequence has the ORDER property. If NO, the sequence has the NOORDER property.
COMMENTVARCHARComment for this sequence

Usage notes

  • The view only displays objects for which the current role for the session has been granted access privileges. The view does not honor the MANAGE GRANTS privilege and consequently may show less information compared to a SHOW command when both are executed by a user who holds the MANAGE GRANTS privilege.
  • The LAST_ALTERED column is updated when the following operations are performed on an object:

    • DDL operations.
    • DML operations (for tables only). This column is updated even when no rows are affected by the DML statement.
    • Background maintenance operations on metadata performed by Snowflake.