On this page

SHOW TABLES

Core command SH TA SHTA

Lists the tables, not the views, whose schema and name contain the text you type.

Syntax

SHOW TABLES [[<schema>.]<name>]

Quick start

SHOW TABLES;

Lists every table of the current schema.

SHOW TABLES CUST;

Lists the tables of the current schema whose name contains CUST.

Arguments

ArgumentRequiredValuesDefault
<name>NoText the table name contains; % matches any textEvery table
<schema>.NoText the schema name contains, followed by a dotThe current schema

Examples

SHOW TABLES;
SHOW TABLES CUSTOMER;
SHOW TABLES CUSTOM%;
SHOW TABLES PUBLIC.CUSTOMER;
SHOW TABLES PUB%.CUSTOMER;
SHOW TABLES PUB%.%STOME%;

Details

Matching

The schema part and the name part are each a "contains" search: SHOW TABLES CUSTOMER; finds CUSTOMER, CUSTOMERS and OLD_CUSTOMER alike, without typing %. A % inside the text matches any text. Whether the match is case-sensitive depends on the connected database.

  • Without a name, every table is listed.
  • Without a schema, only the connection's current schema is searched, not every schema.

What is listed

Only tables: ordinary tables, the temporary tables the database reports (H2 does not report its local temporary tables) and, in a system schema, system tables. Views and materialized views are listed by SHOW VIEWS. Synonyms, sequences, indexes, types and the other objects the database reports are not listed.

Used in these how-tos

Last modified in release 5.5.0.

Found something wrong or unclear on this page? , with the page address.