OpenSearch/docs/reference/sql/language/syntax/show-tables.asciidoc
Costin Leau de9e56aa01
DOC: Add examples to the SQL docs (#31633)
Significantly improve the example snippets in the documentation.
The examples are part of the test suite and checked nightly.
To help readability, the existing dataset was extended (test_emp renamed
to emp plus library).
Improve output of JDBC tests to be consistent with the CLI
Add lenient flag to JDBC asserts to allow type widening (a long is
equivalent to a integer as long as the value is the same).
2018-07-03 16:56:31 +03:00

49 lines
1.0 KiB
Plaintext

[role="xpack"]
[testenv="basic"]
[[sql-syntax-show-tables]]
=== SHOW TABLES
.Synopsis
[source, sql]
----
SHOW TABLES [ LIKE? pattern<1>? ]?
----
<1> SQL match pattern
.Description
List the tables available to the current user and their type.
["source","sql",subs="attributes,callouts,macros"]
----
include-tagged::{sql-specs}/docs.csv-spec[showTables]
----
The `LIKE` clause can be used to restrict the list of names to the given pattern.
The pattern can be an exact match:
["source","sql",subs="attributes,callouts,macros"]
----
include-tagged::{sql-specs}/docs.csv-spec[showTablesLikeExact]
----
Multiple chars:
["source","sql",subs="attributes,callouts,macros"]
----
include-tagged::{sql-specs}/docs.csv-spec[showTablesLikeWildcard]
----
A single char:
["source","sql",subs="attributes,callouts,macros"]
----
include-tagged::{sql-specs}/docs.csv-spec[showTablesLikeOneChar]
----
Or a mixture of single and multiple chars:
["source","sql",subs="attributes,callouts,macros"]
----
include-tagged::{sql-specs}/docs.csv-spec[showTablesLikeMixed]
----