SHOW SCHEMAS

Warning:
Cockroach Labs will stop providing Assistance Support for this version on May 12, 2021. Prior to that date, upgrade to a more recent version to continue receiving support. For more details, see the Release Support Policy.

The SHOW SCHEMAS statement lists all schemas in a database.

Required privileges

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

Synopsis

SHOW SCHEMAS FROM name

Parameters

Parameter Description
name The name of the database for which to show schemas. When omitted, the schemas in the current database are listed.

Example

icon/buttons/copy
> SET DATABASE = bank;
icon/buttons/copy
> SHOW SCHEMAS;
+--------------------+
|    schema_name     |
+--------------------+
| crdb_internal      |
| information_schema |
| pg_catalog         |
| public             |
+--------------------+
(4 rows)

See also

YesYes NoNo