List user created schemas in Snowflake

This query returns list of user created schemas excluding default INFORMATION_SCHEMA and PUBLIC schemas.

Query

select catalog_name as database,
       schema_name,
       schema_owner,
       created,
       last_altered
from information_schema.schemata
where schema_name not in ('INFORMATION_SCHEMA', 'PUBLIC')
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 the database
  • Scope of rows: all user created
  • Ordered by schema name

Sample results

User created schemas in our test database:

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