show-tables.asciidoc 1.4 KB

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