trino cli 语句

27 篇文章 0 订阅

文章目录

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)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值