2018-06-22 18:40:25 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
2018-06-20 14:40:13 -04:00
|
|
|
[[sql-syntax-show-tables]]
|
|
|
|
=== SHOW TABLES
|
|
|
|
|
|
|
|
.Synopsis
|
|
|
|
[source, sql]
|
|
|
|
----
|
2019-04-22 09:22:41 -04:00
|
|
|
SHOW TABLES
|
2019-05-10 07:19:26 -04:00
|
|
|
[INCLUDE FROZEN]? <1>
|
|
|
|
[table identifier | <2>
|
|
|
|
[LIKE pattern ]]? <3>
|
2018-06-20 14:40:13 -04:00
|
|
|
----
|
|
|
|
|
2019-05-10 07:19:26 -04:00
|
|
|
<1> Whether or not to include frozen indices
|
|
|
|
<2> single table identifier or double quoted es multi index
|
|
|
|
<3> SQL LIKE pattern
|
2018-09-04 09:54:10 -04:00
|
|
|
|
2018-09-04 12:05:21 -04:00
|
|
|
See <<sql-index-patterns, index patterns>> for more information about
|
2018-09-04 09:54:10 -04:00
|
|
|
patterns.
|
|
|
|
|
2018-06-20 14:40:13 -04:00
|
|
|
|
|
|
|
.Description
|
|
|
|
|
2018-07-03 09:56:31 -04:00
|
|
|
List the tables available to the current user and their type.
|
|
|
|
|
2019-05-31 13:03:41 -04:00
|
|
|
[source, sql]
|
2018-07-03 09:56:31 -04:00
|
|
|
----
|
2019-03-25 09:22:59 -04:00
|
|
|
include-tagged::{sql-specs}/docs/docs.csv-spec[showTables]
|
2018-07-03 09:56:31 -04:00
|
|
|
----
|
|
|
|
|
2018-09-04 09:54:10 -04:00
|
|
|
Match multiple indices by using {es} <<multi-index,multi index syntax>>
|
|
|
|
notation:
|
|
|
|
|
2019-05-31 13:03:41 -04:00
|
|
|
[source, sql]
|
2018-09-04 09:54:10 -04:00
|
|
|
----
|
2019-03-25 09:22:59 -04:00
|
|
|
include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesEsMultiIndex]
|
2018-09-04 09:54:10 -04:00
|
|
|
----
|
|
|
|
|
|
|
|
One can also use the `LIKE` clause to restrict the list of names to the given pattern.
|
2018-07-03 09:56:31 -04:00
|
|
|
|
|
|
|
The pattern can be an exact match:
|
2019-05-31 13:03:41 -04:00
|
|
|
[source, sql]
|
2018-07-03 09:56:31 -04:00
|
|
|
----
|
2019-03-25 09:22:59 -04:00
|
|
|
include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeExact]
|
2018-07-03 09:56:31 -04:00
|
|
|
----
|
|
|
|
|
|
|
|
Multiple chars:
|
2019-05-31 13:03:41 -04:00
|
|
|
[source, sql]
|
2018-07-03 09:56:31 -04:00
|
|
|
----
|
2019-03-25 09:22:59 -04:00
|
|
|
include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeWildcard]
|
2018-07-03 09:56:31 -04:00
|
|
|
----
|
|
|
|
|
|
|
|
A single char:
|
2019-05-31 13:03:41 -04:00
|
|
|
[source, sql]
|
2018-07-03 09:56:31 -04:00
|
|
|
----
|
2019-03-25 09:22:59 -04:00
|
|
|
include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeOneChar]
|
2018-07-03 09:56:31 -04:00
|
|
|
----
|
|
|
|
|
|
|
|
|
|
|
|
Or a mixture of single and multiple chars:
|
2019-05-31 13:03:41 -04:00
|
|
|
[source, sql]
|
2018-07-03 09:56:31 -04:00
|
|
|
----
|
2019-03-25 09:22:59 -04:00
|
|
|
include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeMixed]
|
2018-07-03 09:56:31 -04:00
|
|
|
----
|