show-tables.asciidoc 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[sql-syntax-show-tables]]
  4. === SHOW TABLES
  5. .Synopsis
  6. [source, sql]
  7. ----
  8. SHOW TABLES [ LIKE? pattern<1>? ]?
  9. ----
  10. <1> SQL match pattern
  11. .Description
  12. List the tables available to the current user and their type.
  13. ["source","sql",subs="attributes,callouts,macros"]
  14. ----
  15. include-tagged::{sql-specs}/docs.csv-spec[showTables]
  16. ----
  17. The `LIKE` clause can be used to restrict the list of names to the given pattern.
  18. The pattern can be an exact match:
  19. ["source","sql",subs="attributes,callouts,macros"]
  20. ----
  21. include-tagged::{sql-specs}/docs.csv-spec[showTablesLikeExact]
  22. ----
  23. Multiple chars:
  24. ["source","sql",subs="attributes,callouts,macros"]
  25. ----
  26. include-tagged::{sql-specs}/docs.csv-spec[showTablesLikeWildcard]
  27. ----
  28. A single char:
  29. ["source","sql",subs="attributes,callouts,macros"]
  30. ----
  31. include-tagged::{sql-specs}/docs.csv-spec[showTablesLikeOneChar]
  32. ----
  33. Or a mixture of single and multiple chars:
  34. ["source","sql",subs="attributes,callouts,macros"]
  35. ----
  36. include-tagged::{sql-specs}/docs.csv-spec[showTablesLikeMixed]
  37. ----