# SHOW TABLES

## Syntax

```sql
SHOW [FULL] TABLES [FROM db_name]
    [LIKE 'pattern' | WHERE expr]
```

## Description

{% tabs %}
{% tab title="Current" %}
`SHOW TABLES` lists the tables, [sequences](/docs/server/reference/sql-structure/sequences.md) and [views](/docs/server/server-usage/views.md) in a given database.
{% endtab %}

{% tab title="< 11.2.0" %}
`SHOW TABLES` lists the tables (only non-`TEMPORARY` tables are shown), [sequences](/docs/server/reference/sql-structure/sequences.md) and [views](/docs/server/server-usage/views.md) in a given database.
{% endtab %}
{% endtabs %}

The `LIKE` clause, if present on its own, indicates which table names to match. The `WHERE` and `LIKE` clauses can be given to select rows using more general conditions, as discussed in [Extended SHOW](/docs/server/reference/sql-statements/administrative-sql-statements/show/extended-show.md). For example, when searching for tables in the `test` database, the column name for use in the `WHERE` and `LIKE` clauses will be `Tables_in_test`

The `FULL` modifier is supported such that `SHOW FULL TABLES` displays a second output column. Values for the second column, `Table_type`, are `BASE TABLE` for a table, `VIEW` for a [view](/docs/server/server-usage/views.md) and `SEQUENCE` for a [sequence](/docs/server/reference/sql-structure/sequences.md).

You can also get this information using:

```bash
mariadb-show db_name
```

See [mariadb-show](/docs/server/clients-and-utilities/administrative-tools/mariadb-show.md) for more details.

If you have no privileges for a base table or view, it does not show up in the output from `SHOW TABLES` or `mariadb-show db_name`.

The [information\_schema.TABLES](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-tables-table.md) table, as well as the [SHOW TABLE STATUS](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-table-status.md) statement, provide extended information about tables.

## Examples

```sql
SHOW TABLES;
+----------------------+
| Tables_in_test       |
+----------------------+
| animal_count         |
| animals              |
| are_the_mooses_loose |
| aria_test2           |
| t1                   |
| view1                |
+----------------------+
```

Showing the tables beginning with *a* only.

```sql
SHOW TABLES WHERE Tables_in_test LIKE 'a%';
+----------------------+
| Tables_in_test       |
+----------------------+
| animal_count         |
| animals              |
| are_the_mooses_loose |
| aria_test2           |
+----------------------+
```

Showing tables and table types:

```sql
SHOW FULL TABLES;
+----------------+------------+
| Tables_in_test | Table_type |
+----------------+------------+
| s1             | SEQUENCE   |
| student        | BASE TABLE |
| v1             | VIEW       |
+----------------+------------+
```

Showing temporary tables: <= [MariaDB 11.1](/docs/release-notes/community-server/old-releases/11.1/what-is-mariadb-111.md)

```sql
CREATE TABLE t (t INT(11));
CREATE TEMPORARY TABLE t (t INT(11));
CREATE TEMPORARY TABLE te (t INT(11));

SHOW TABLES;
+----------------+
| Tables_in_test |
+----------------+
| t              |
+----------------+
```

From [MariaDB 11.2.0](/docs/release-notes/community-server/old-releases/11.2/11.2.0.md):

```sql
CREATE TABLE t (t INT(11));
CREATE TEMPORARY TABLE t (t INT(11));
CREATE TEMPORARY TABLE te (t INT(11));

SHOW TABLES;
+----------------+
| Tables_in_test |
+----------------+
| te             |
| t              |
| t              |
+----------------+
```

## See Also

* [SHOW TABLE STATUS](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-table-status.md)
* The [information\_schema.TABLES](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-tables-table.md) table

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-tables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
