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 Amazon 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
that you specify. For wildcard character matching, you can use the combinationregular_expression
.*
, which matches any character zero to unlimited times.
Examples
SHOW SCHEMAS;
SHOW DATABASES LIKE '.*analytics';