elasticsearch/docs/reference/sql/language/syntax/commands/show-tables.asciidoc
Bogdan Pintea 13a0e420a3
SQL: Add CCS SQL documentation (#81545)
This adds the documentation for CCS SQL.

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2022-01-05 20:01:01 +01:00

72 lines
1.8 KiB
Text

[role="xpack"]
[[sql-syntax-show-tables]]
=== SHOW TABLES
.Synopsis:
[source, sql]
----
SHOW TABLES
[CATALOG [catalog_identifier | <1>
LIKE pattern]]? <2>
[INCLUDE FROZEN]? <3>
[table_identifier | <4>
LIKE pattern]? <5>
----
<1> Catalog (cluster) identifier. Supports wildcards (`*`).
<2> SQL LIKE pattern matching catalog names.
<3> Whether or not to include frozen indices.
<4> Single table (index or data stream) identifier or double-quoted multi-target pattern.
<5> SQL LIKE pattern matching table names.
See <<sql-index-patterns, index patterns>> for more information about
patterns.
*Description*: List the tables available to the current user and their type.
[source, sql]
----
include-tagged::{sql-specs}/docs/docs.csv-spec[showTables]
----
Match multiple indices by using {es} <<api-multi-index,multi-target syntax>>
notation:
[source, sql]
----
include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesEsMultiIndex]
----
One can also use the `LIKE` clause to restrict the list of names to the given pattern.
The pattern can be an exact match:
[source, sql]
----
include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeExact]
----
Multiple chars:
[source, sql]
----
include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeWildcard]
----
A single char:
[source, sql]
----
include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeOneChar]
----
Or a mixture of single and multiple chars:
[source, sql]
----
include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeMixed]
----
List tables within remote clusters whose names are matched by a wildcard:
[source, sql]
----
include-tagged::{sql-specs}/multi-cluster-with-security/multi-cluster-command.csv-spec[showTablesCatalogPatternMultiLike]
----