Skip to main content
Lists the databases, schemas, or tables within an existing catalog, as its external source reports them.
These statements query the external source directly, and will fail if it is unreachable. They require READ access on the catalog and CONNECT access on its data source; see GRANT Catalog Permission.

Parameters

IN / FROM

Interchangeable keywords preceding the catalog name.

<catalog name>

Name of the existing catalog whose contents will be listed. If omitted from SHOW DATABASES, the session’s default catalog is listed.

<database name>

Database within the catalog whose schemas or tables will be listed.

<schema name>

Schema within the catalog whose tables will be listed. If omitted from SHOW TABLES, the catalog’s SCHEMA option is used—see Catalog Options.
The contents listed depend on the type of catalog:
  • A catalog with a DATABASE option lists only that database.
  • A JDBC catalog over a source with no schemas, such as MySQL, lists its databases with no schema.
  • An Apache Iceberg catalog has namespaces instead of databases: SHOW DATABASES is rejected, SHOW SCHEMAS lists the namespaces at every level (e.g., sales & sales.eu), and SHOW TABLES lists the tables in one namespace.
  • A Delta Lake catalog lists its Unity Catalog catalogs as databases.

Response

Examples

To list the databases within a JDBC catalog:
SHOW DATABASES IN Example
DATABASES IN Output
To list the schemas within a JDBC catalog:
SHOW SCHEMAS IN Example
SCHEMAS IN Output