14

In Presto

SHOW SCHEMAS; returns all schemas

SHOW TABLES FROM foo; returns all tables for foo schema

Is there a simple way to return tables from all schemas in Presto?

Piotr Findeisen
  • 19,480
  • 2
  • 52
  • 82
Gregology
  • 1,625
  • 2
  • 18
  • 32
  • I am very new to presto, so go these basic questions: how to restart presto-server, any sample command please. also how to get into presto-shell or presto-cli and get into a database and run a sample select query, thanks in advance – TheCodeCache Nov 27 '20 at 09:23

1 Answers1

23

You can use select table_schema, table_name from information_schema.tables;

袁安峰
  • 652
  • 6
  • 5
  • One can also add the `where table_name = 'table_of_interest'` clause to get information on a specific table and it supports the typical Preto fuzzy search as well (i.e., `'%table_of%'` – DataSci-IOPsy Nov 19 '21 at 17:00