show-tables.asciidoc 1.4 KB

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