Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

SHOW TABLES

Focus mode
SHOW TABLES - Amazon Athena

Lists all the base tables and views in a database.

Note

The StatementType parameter for SHOW TABLES in GetQueryExecution API operation is categorized as UTILITY, not DDL.

Synopsis

SHOW TABLES [IN database_name] ['regular_expression']

Parameters

[IN database_name]

Specifies the database_name from which tables will be listed. If omitted, the database from the current context is assumed.

Note

SHOW TABLES may fail if database_name uses an unsupported character such as a hyphen. As a workaround, try enclosing the database name in backticks.

['regular_expression']

Filters the list of tables to those that match the regular_expression you specify. To indicate any character in AWSDataCatalog tables, you can use the * or .* wildcard expression. For Apache Hive databases, use the .* wildcard expression. To indicate a choice between characters, use the | character.

Examples

Example – Show all of the tables in the database sampledb
SHOW TABLES IN sampledb

Results

alb_logs cloudfront_logs elb_logs flights_2016 flights_parquet view_2016_flights_dfw
Example – Show the names of all tables in sampledb that include the word "flights"
SHOW TABLES IN sampledb '*flights*'

Results

flights_2016 flights_parquet view_2016_flights_dfw
Example – Show the names of all tables in sampledb that end in the word "logs"
SHOW TABLES IN sampledb '*logs'

Results

alb_logs cloudfront_logs elb_logs

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.