> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SHOW DATABASES / SCHEMAS / TABLES IN CATALOG

Lists the databases, schemas, or tables within an existing
[catalog](https://docs.kinetica.com/content/sql/ddl/create-catalog.md#sql-create-catalog), as its external source reports
them.

```sql SHOW DATABASES theme={null}
SHOW DATABASES [<IN | FROM> <catalog name>]
```

```sql SHOW SCHEMAS theme={null}
SHOW SCHEMAS <IN | FROM> <catalog name>[.<database name>]
```

```sql SHOW TABLES theme={null}
SHOW TABLES <IN | FROM> <catalog name>[.[<database name>.]<schema name>]
```

> [!NOTE]
>
> 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](https://docs.kinetica.com/content/sql/security/grant-catalog-permission.md#sql-security-priv-mgmt-catalog-grant).

## Parameters

> [accordion] IN / FROM
>
> Interchangeable keywords preceding the *catalog* name.

> [accordion] \<catalog name>
>
> Name of the existing *catalog* whose contents will be listed.  If omitted
> from `SHOW DATABASES`, the session's
> [default catalog](https://docs.kinetica.com/content/sql/ddl/set-catalog.md#sql-set-catalog) is listed.

> [accordion] \<database name>
>
> Database within the *catalog* whose schemas or tables will be listed.

> [accordion] \<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](https://docs.kinetica.com/content/sql/ddl/create-catalog.md#sql-catalog-opts).

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

| Statement | Output Columns |
| - | - |
| `SHOW DATABASES` | `DATABASE_NAME` |
| `SHOW SCHEMAS` | `DATABASE_NAME`, `SCHEMA_NAME` |
| `SHOW TABLES` | `DATABASE_NAME`, `SCHEMA_NAME`, `TABLE_NAME`, `TABLE_TYPE` |

## Examples

To list the databases within a JDBC *catalog*:

```sql SHOW DATABASES IN Example theme={null}
SHOW DATABASES IN jdbc_cat
```

```SHOW DATABASES IN Output theme={null}
+-----------------+
| DATABASE_NAME   |
+-----------------+
| KINETICA        |
+-----------------+
```

To list the schemas within a JDBC *catalog*:

```sql SHOW SCHEMAS IN Example theme={null}
SHOW SCHEMAS IN jdbc_cat
```

```SHOW SCHEMAS IN Output theme={null}
+-----------------+----------------------+
| DATABASE_NAME   | SCHEMA_NAME          |
+-----------------+----------------------+
| KINETICA        | SYSTEM               |
| KINETICA        | example_fed          |
| KINETICA        | information_schema   |
| KINETICA        | ki_catalog           |
| KINETICA        | pg_catalog           |
+-----------------+----------------------+
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.