Skip to content

Commit

Permalink
Improve SHOW TABLES docs
Browse files Browse the repository at this point in the history
- And related other sections in the SQL docs
  • Loading branch information
mosabua committed Jul 11, 2024
1 parent 135d688 commit 1f3f87b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
5 changes: 4 additions & 1 deletion docs/src/main/sphinx/sql/create-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,7 @@ FROM orders

## See also

{doc}`drop-view`, {doc}`show-create-view`
* [](/sql/alter-view)
* [](/sql/drop-view)
* [](/sql/show-create-view)
* [](/sql/show-tables)
23 changes: 18 additions & 5 deletions docs/src/main/sphinx/sql/show-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,25 @@ SHOW TABLES [ FROM schema ] [ LIKE pattern ]

## Description

List the tables in `schema` or in the current schema.
List the tables and views in the current schema, for example set with
[](/sql/use) or by a client connection.

{ref}`Specify a pattern <like-operator>` in the optional `LIKE` clause to
filter the results to the desired subset.. For example, the following query
allows you to find tables that begin with `p`:
Use a fully qualified path to a schema in the form of `catalog_name.schema_name`
to specify any schema in any catalog in the `FROM` clause.

```
[Specify a pattern](like-operator) in the optional `LIKE` clause to filter
the results to the desired subset.

## Examples

The following query lists tables and views that begin with `p` in
the `tiny` schema of the `tpch` catalog:

```sql
SHOW TABLES FROM tpch.tiny LIKE 'p%';
```

## See also

* [](sql-schema-table-management)
* [](sql-view-management)

0 comments on commit 1f3f87b

Please sign in to comment.