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
IN / FROM
Interchangeable keywords preceding the catalog name.
<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 name>
Database within the catalog whose schemas or tables will be listed.
<schema name>
<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.- A catalog with a
DATABASEoption 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 DATABASESis rejected,SHOW SCHEMASlists the namespaces at every level (e.g.,sales&sales.eu), andSHOW TABLESlists 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
SHOW SCHEMAS IN Example
SCHEMAS IN Output