SHOW DATABASES - Amazon Athena

SHOW DATABASES

Lists all databases defined in the metastore. You can use DATABASES or SCHEMAS. They mean the same thing.

The programmatic equivalent of SHOW DATABASES is the ListDatabases Athena API action. The equivalent method in AWS SDK for Python (Boto3) is list_databases.

Synopsis

SHOW {DATABASES | SCHEMAS} [LIKE 'regular_expression']

Parameters

[LIKE 'regular_expression']

Filters the list of databases to those that match the regular_expression that you specify. For wildcard character matching, you can use the combination .*, which matches any character zero to unlimited times.

Examples

SHOW SCHEMAS;
SHOW DATABASES LIKE '.*analytics';