SEQUENCES View

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

Columns

Column Name

Data Type

Description

SEQUENCE_CATALOG

TEXT

Database that the sequence belongs to

SEQUENCE_SCHEMA

TEXT

Schema that the sequence belongs to

SEQUENCE_NAME

TEXT

Name of the sequence

SEQUENCE_OWNER

TEXT

Name of the role that owns the sequence

DATA_TYPE

TEXT

Data type of the sequence

NUMERIC_PRECISION

NUMBER

Numeric precision of the data type of the sequence

NUMERIC_PRECISION_RADIX

NUMBER

Radix of the numeric precision of the data type of the sequence

NUMERIC_SCALE

NUMBER

Scale of the data type of the sequence

START_VALUE

TEXT

Initial value of the sequence

MINIMUM_VALUE

TEXT

Not applicable for Snowflake.

MAXIMUM_VALUE

TEXT

Not applicable for Snowflake.

NEXT_VALUE

TEXT

Next value that the sequence will produce

INCREMENT

TEXT

Increment of the sequence generator

CYCLE_OPTION

TEXT

Not applicable for Snowflake.

CREATED

TIMESTAMP_LTZ

Creation time of the sequence

LAST_ALTERED

TIMESTAMP_LTZ

Date and time the object was last altered. See Usage Notes.

ORDERED

TEXT

If YES, the sequence has the ORDER property. If NO, the sequence has the NOORDER property.

COMMENT

TEXT

Comment 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).

    • Background maintenance operations on metadata performed by Snowflake.