show-tables.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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
  19. List the tables available to the current user and their type.
  20. [source, sql]
  21. ----
  22. include-tagged::{sql-specs}/docs/docs.csv-spec[showTables]
  23. ----
  24. Match multiple indices by using {es} <<multi-index,multi index syntax>>
  25. notation:
  26. [source, sql]
  27. ----
  28. include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesEsMultiIndex]
  29. ----
  30. One can also use the `LIKE` clause to restrict the list of names to the given pattern.
  31. The pattern can be an exact match:
  32. [source, sql]
  33. ----
  34. include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeExact]
  35. ----
  36. Multiple chars:
  37. [source, sql]
  38. ----
  39. include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeWildcard]
  40. ----
  41. A single char:
  42. [source, sql]
  43. ----
  44. include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeOneChar]
  45. ----
  46. Or a mixture of single and multiple chars:
  47. [source, sql]
  48. ----
  49. include-tagged::{sql-specs}/docs/docs.csv-spec[showTablesLikeMixed]
  50. ----