Schema:

ORGANIZATION_USAGE

SEQUENCES view

Important

This view is only available in the organization account. For more information, see Premium views in the organization account.

This Organization Usage view displays a row for each sequence defined in an account.

Columns

Organization-level columns

Column NameData TypeDescription
ORGANIZATION_NAMEVARCHARName of the organization.
ACCOUNT_LOCATORVARCHARSystem-generated identifier for the account.
ACCOUNT_NAMEVARCHARUser-defined identifier for the account.

Additional columns

Column NameData TypeDescription
SEQUENCE_IDNUMBERInternal/system-generated identifier for the sequence.
SEQUENCE_NAMEVARCHARName of the sequence.
SEQUENCE_SCHEMA_IDNUMBERInternal/system-generated identifier for the schema of the sequence.
SEQUENCE_SCHEMAVARCHARSchema that the sequence belongs to.
SEQUENCE_CATALOG_IDNUMBERInternal/system-generated identifier for the database of the sequence.
SEQUENCE_CATALOGVARCHARDatabase that the sequence belongs to.
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.
ORDEREDVARCHARIf YES, the sequence has the ORDER property. If NO, the sequence has the NOORDER property.
CREATEDTIMESTAMP_LTZDate and time when the sequence was created.
LAST_ALTEREDTIMESTAMP_LTZDate and time the object was last altered by a DML, DDL, or background metadata operation. See Usage Notes.
DELETEDTIMESTAMP_LTZDate and time when the sequence was dropped.
COMMENTVARCHARComment for the sequence.
OWNER_ROLE_TYPEVARCHARThe type of role that owns the object, for example ROLE.
If a Snowflake Native App owns the object, the value is APPLICATION.
Snowflake returns NULL if you delete the object because a deleted object does not have an owner role.

Usage notes

  • Latency for the view may be up to 24 hours.
  • The view only displays objects for which the current role for the session has been granted access privileges.
  • The view does not recognize the MANAGE GRANTS privilege and consequently may show less information compared to a SHOW command 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.