【发布时间】:2018-12-01 16:38:13
【问题描述】:
【问题讨论】:
【问题讨论】:
SHOW TABLES LIKE pattern 的行为类似于典型的 SQL LIKE 运算符:
% - 百分号表示零个、一个或多个字符
_ - 下划线代表单个字符
见https://www.w3schools.com/sql/sql_like.asp。
presto:tiny> show tables like 'n_tion';
Table
--------
nation
(1 row)
presto:tiny> show tables like 'n%';
Table
--------
nation
(1 row)
【讨论】:
SHOW TABLE LIKE <pattern> not 的行为类似于 SQL 的 LIKE。
对于那些与 Athena 合作并最终来到这里的人,请参阅https://docs.aws.amazon.com/athena/latest/ug/show-tables.html
它使用* 而不是%。
例如 - SHOW TABLES IN sampledb '*flights*'
【讨论】: