show-tables.asciidoc 1.3 KB

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