Skip to main content
The SHOW SCHEMAS lists all in a database.

Required privileges

The CONNECT on the database is required to list the schemas in a database.

Synopsis

show_schemas syntax diagram

Parameters

ParameterDescription
nameThe name of the database for which to show . When omitted, the schemas in the are listed.

Example

Setup

To follow along, run to start a temporary, in-memory cluster with the sample dataset preloaded:
$ cockroach demo

Show schemas in the current database

> CREATE SCHEMA org_one;
> SHOW SCHEMAS;
     schema_name
----------------------
  crdb_internal
  information_schema
  org_one
  pg_catalog
  pg_extension
  public
(6 rows)

See also