SCHEMATA view¶
This Information Schema view displays a row for each schema in the specified (or current) database, including the INFORMATION_SCHEMA schema itself.
Columns¶
| Column Name | Data Type | Description |
|---|---|---|
| CATALOG_NAME | VARCHAR | Database that the schema belongs to |
| SCHEMA_NAME | VARCHAR | Name of the schema |
| SCHEMA_OWNER | VARCHAR | Name of the role that owns the schema |
| IS_TRANSIENT | VARCHAR | Whether this is a transient schema |
| IS_MANAGED_ACCESS | VARCHAR | Whether the schema is a managed access schema |
| RETENTION_TIME | NUMBER | Number of days that historical data is retained for Time Travel |
| DEFAULT_CHARACTER_SET_CATALOG | VARCHAR | Not applicable for Snowflake. |
| DEFAULT_CHARACTER_SET_SCHEMA | VARCHAR | Not applicable for Snowflake. |
| DEFAULT_CHARACTER_SET_NAME | VARCHAR | Not applicable for Snowflake. |
| SQL_PATH | VARCHAR | Not applicable for Snowflake. |
| CREATED | TIMESTAMP_LTZ | Creation time of the schema |
| LAST_ALTERED | TIMESTAMP_LTZ | Date and time the object was last altered by a DML, DDL, or background metadata operation. See Usage Notes. |
| COMMENT | VARCHAR | Comment for this schema |
Usage notes¶
- The view only displays objects for which the current role for the session has been granted access privileges.
-
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.