show
show catalogs
Catalog
-----------
jmx
memory
system
tpcds
tpch
(5 rows)
列出 tpch 中的所有schema
SHOW SCHEMAS FROM tpch;
Schema
--------------------
information_schema
sf1
sf100
sf1000
sf10000
sf100000
sf300
sf3000
sf30000
tiny
(10 rows)
列出所有的表
SHOW TABLES FROM tpch.sf100;
Table
--------------------------------------------
111
1535968297468
1535969713786
1535970283020
1535970332677
1535970538428
1535971412026
1535971596376
15359717939870
1535971793987000
15359717939871
1535972479472
use
可以使用use 就可以不用每次都输入catalog 和 schema
trino> USE tpch.sf100;
列出所有表
trino:sf100> SHOW TABLES;
Table
----------
customer
lineitem
nation
orders
part
partsupp
region
supplier
(8 rows)
展示表结构
SHOW COLUMNS FROM customer;
Column | Type | Extra | Comment
------------+--------------+-------+---------
custkey | bigint | |
name | varchar(25) | |
address | varchar(40) | |
nationkey | bigint | |
phone | varchar(15) | |
acctbal | double | |
mktsegment | varchar(10) | |
comment | varchar(117) | |
(8 rows)