---
title: SHOW TABLES
description: List the tables in an optionally specified schema with SHOW TABLES in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-tables
---

# SHOW TABLES

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Returns all the tables for an optionally specified schema.
Additionally, the output of this statement may be filtered by an optional matching
pattern. If no schema is specified then the tables are returned from the
current schema.

## Syntax

```
SHOW TABLES [ { FROM | IN } schema_name ] [ [ LIKE ] regex_pattern ]
```

## Parameters

* **[schema\_name](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-names.md#schema-name)**

  Specifies schema name from which tables are to be listed. If not provided, uses the current schema.

* **regex\_pattern**

  The regular expression pattern that is used to filter out unwanted tables.

  * Except for `*` and `|` character, the pattern works like a regular expression.
  * `*` alone matches 0 or more characters and `|` is used to separate multiple different regular expressions,
    any of which can match.
  * The leading and trailing blanks are trimmed in the input pattern before processing. The pattern match is case-insensitive.

## Examples

```sql
-- List all tables in default schema
> SHOW TABLES;
 database tableName isTemporary
 -------- --------- -----------
  default       sam       false
  default      sam1       false
  default       suj       false

-- List all tables from usersc schema
> SHOW TABLES FROM usersc;
 database tableName isTemporary
 -------- --------- -----------
   usersc     user1       false
   usersc     user2       false

-- List all tables in usersc schema
> SHOW TABLES IN usersc;
 database tableName isTemporary
 -------- --------- -----------
   usersc     user1       false
   usersc     user2       false

-- List all tables from default schema matching the pattern `sam*`
> SHOW TABLES FROM default LIKE 'sam*';
 database tableName isTemporary
 -------- --------- -----------
  default       sam       false
  default      sam1       false

-- List all tables matching the pattern `sam*|suj`
> SHOW TABLES LIKE 'sam*|suj';
 database tableName isTemporary
 -------- --------- -----------
  default       sam       false
  default      sam1       false
  default       suj       false

-- Assumes there exists a temporary table named `temp`.
> SHOW TABLES;
 database tableName isTemporary
 -------- --------- -----------
               temp        true
```

## Related articles

* [CREATE SCHEMA](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-schema.md)
* [CREATE TABLE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-table.md)
* [DROP SCHEMA](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-drop-schema.md)
* [DROP TABLE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-drop-table.md)
* [INFORMATION\_SCHEMA.COLUMNS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/columns.md)
* [INFORMATION\_SCHEMA.TABLES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/tables.md)
