CLASS_INSTANCES view

This Information Schema view displays a row for each class instance in a database.

See also:

CLASS_INSTANCE_FUNCTIONS view, CLASS_INSTANCE_PROCEDURES view

Columns

Column NameData TypeDescription
NAMEVARCHARName of the instance.
SCHEMA_NAMEVARCHARName of the schema the instance belongs to.
DATABASE_NAMEVARCHARName of the database the instance belongs to.
CLASS_NAMEVARCHARName of the class the instance is instantiated from.
CLASS_SCHEMA_NAMEVARCHARName of the schema of the class the instance is instantiated from.
CLASS_DATABASE_NAMEVARCHARName of the database of the class the instance is instantiated from.
VERSIONVARCHARCurrent version of the instance.
OWNERVARCHARName of the role that owns the instance.
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.
CREATEDTIMESTAMP_LTZDate and time when the instance was created.
COMMENTVARCHARComment for the instance.

Usage notes

  • The view only displays objects for which the current role for the session has been granted access privileges.
  • The view does not include instances that have been dropped. To view dropped instances, use the Account Usage CLASS_INSTANCES view instead.

Examples

Retrieve the names of all instances, and the class they were instantiated from, in the mydatabase database:

SELECT name, class_name, class_schema_name, class_database_name
    FROM mydatabase.INFORMATION_SCHEMA.CLASS_INSTANCES;