On this page
Warning:Cockroach Labs will stop providing Assistance Support for v22.1 on November 24, 2023. Prior to that date, upgrade to a more recent version to continue receiving support. For more details, see the Release Support Policy.
SHOW SCHEMAS statement lists all schemas in a database.
CONNECT privilege on the database is required to list the schemas in a database.
||The name of the database for which to show schemas. When omitted, the schemas in the current database are listed.|
The following examples use MovR, a fictional vehicle-sharing application, to demonstrate CockroachDB SQL statements. For more information about the MovR example application and dataset, see MovR: A Global Vehicle-sharing App.
To follow along, run
cockroach demo to start a temporary, in-memory cluster with the
movr 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)