SHOW SCHEMAS

The SHOW SCHEMAS statement lists all schemas in a database.

Required privileges

No privileges are required to list the schemas in a database.

Synopsis

SHOWSCHEMASFROMname

Parameters

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

Example

  1. > SET DATABASE = bank;
  1. > SHOW SCHEMAS;
  1. +--------------------+
  2. | schema_name |
  3. +--------------------+
  4. | crdb_internal |
  5. | information_schema |
  6. | pg_catalog |
  7. | public |
  8. +--------------------+
  9. (4 rows)

See also

Was this page helpful?
YesNo