List schemas in Snowflake

Query below lists all schemas in Snowflake database. Schemas include default information_schema schema.

If you want to list user only schemas use this script.

Query

select catalog_name as database,
       schema_name,
       schema_owner,
       created,
       last_altered
from information_schema.schemata
order by schema_name;

Columns

  • database - database that the schema belongs to
  • schema_name - name of the schema
  • schema_owner - name of the role that owns the schema
  • created - creation time of the schema
  • last_altered - last altered time of the schema

Rows

  • One row represents one schema in a database
  • Scope of rows: all schemas in a database, including default ones
  • Ordered by schema name

Sample results

Here is a view of database schemas in Web User Interface

0
There are no comments. Click here to write the first comment.