CLASS_ INSTANCES view¶
This Information Schema view displays a row for each class instance in a database.
Columns¶
| Column Name | Data Type | Description |
|---|---|---|
| NAME | VARCHAR | Name of the instance. |
| SCHEMA_NAME | VARCHAR | Name of the schema the instance belongs to. |
| DATABASE_NAME | VARCHAR | Name of the database the instance belongs to. |
| CLASS_NAME | VARCHAR | Name of the class the instance is instantiated from. |
| CLASS_SCHEMA_NAME | VARCHAR | Name of the schema of the class the instance is instantiated from. |
| CLASS_DATABASE_NAME | VARCHAR | Name of the database of the class the instance is instantiated from. |
| VERSION | VARCHAR | Current version of the instance. |
| OWNER | VARCHAR | Name of the role that owns the instance. |
| OWNER_ROLE_TYPE | VARCHAR | The 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. |
| CREATED | TIMESTAMP_LTZ | Date and time when the instance was created. |
| COMMENT | VARCHAR | Comment 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: