show-tables.asciidoc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. [role="xpack"]
  2. [[sql-syntax-show-tables]]
  3. === SHOW TABLES
  4. .Synopsis:
  5. [source, sql]
  6. ----
  7. SHOW TABLES
  8. [CATALOG [catalog_identifier | <1>
  9. LIKE pattern]]? <2>
  10. [INCLUDE FROZEN]? <3>
  11. [table_identifier | <4>
  12. LIKE pattern]? <5>
  13. ----
  14. <1> Catalog (cluster) identifier. Supports wildcards (`*`).
  15. <2> SQL LIKE pattern matching catalog names.
  16. <3> Whether or not to include frozen indices.
  17. <4> Single table (index or data stream) identifier or double-quoted multi-target pattern.
  18. <5> SQL LIKE pattern matching table names.
  19. See <<sql-index-patterns, index patterns>> for more information about
  20. patterns.
  21. *Description*: List the tables available to the current user and their type.
  22. [source, sql]
  23. ----
  24. include-tagged::{sql-specs}/docs/docs.csv-spec[showTables]
  25. ----
  26. Match multiple indices by using {es} <<api-multi-index,multi-target syntax>>
  27. notation:
  28. [source, sql]
  29. ----
  30. include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesEsMultiIndex]
  31. ----
  32. One can also use the `LIKE` clause to restrict the list of names to the given pattern.
  33. The pattern can be an exact match:
  34. [source, sql]
  35. ----
  36. include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeExact]
  37. ----
  38. Multiple chars:
  39. [source, sql]
  40. ----
  41. include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeWildcard]
  42. ----
  43. A single char:
  44. [source, sql]
  45. ----
  46. include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeOneChar]
  47. ----
  48. Or a mixture of single and multiple chars:
  49. [source, sql]
  50. ----
  51. include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeMixed]
  52. ----
  53. List tables within remote clusters whose names are matched by a wildcard:
  54. [source, sql]
  55. ----
  56. include-tagged::{sql-specs}/multi-cluster-with-security/multi-cluster-command.csv-spec[showTablesCatalogPatternMultiLike]
  57. ----