Overview

The SHOW SCHEMAS EXTENDED statement is used to view the list of schemas under the current workspace, with the EXTENDED keyword showing each schema's type (managed or external). The WHERE clause can be used to filter for external schemas.

Syntax

SHOW SCHEMAS [ EXTENDED [ WHERE expr ] ];

Parameter Description

ParameterRequiredDescription
EXTENDEDNoAdds a type column to the result, showing the schema type
WHERE exprNoFilters by returned columns; only effective when EXTENDED is used

Return Columns

Without EXTENDED

Column NameTypeDescription
schema_nameSTRINGSchema name

With EXTENDED

Column NameTypeDescription
schema_nameSTRINGSchema name
typeSTRINGSchema type: managed, external, or shared

Examples

Example 1: View All Schemas

SHOW SCHEMAS;

Sample output:

+------------------+ | schema_name | +------------------+ | doc_test | | information_schema | | public | +------------------+

Example 2: View All Schemas and Their Types

SHOW SCHEMAS EXTENDED;

Sample output:

+--------------------+---------+ | schema_name | type | +--------------------+---------+ | doc_test | managed | | information_schema | shared | | public | managed | +--------------------+---------+

Example 3: Filter External Schemas

SHOW SCHEMAS EXTENDED WHERE type = 'external';

Sample output (when external schemas exist):

+--------------------+----------+ | schema_name | type | +--------------------+----------+ | my_external_schema | external | +--------------------+----------+

Example 4: Filter Managed Schemas

SHOW SCHEMAS EXTENDED WHERE type = 'managed';

Sample output (partial):

+------------------+---------+ | schema_name | type | +------------------+---------+ | doc_test | managed | | public | managed | +------------------+---------+

Notes

  • The WHERE clause can only reference columns returned in EXTENDED mode (schema_name, type).
  • Possible values for type are managed (managed schema), external (external schema), and shared (shared schema introduced via SHARE).
  • If no external schemas exist under the current workspace, WHERE type='external' will return an empty result set.