Skip to Content
Presto实战
book

Presto实战

by Matt Fuller, Manfred Moser, Martin Traverso
March 2021
Intermediate to advanced
265 pages
6h 50m
Chinese
Posts & Telecom Press
Content preview from Presto实战
Presto
中使用
SQL
147
没有比较结果为
TRUE
,但子查询中存在一个
NULL
值,那么
IN
表达式的结果是
NULL
。在大
多数情况下这不会被注意到,因为结果无论是
FALSE
还是
NULL
都会导致过滤该行。但是,
如果这个
IN
表达式是作为对
NULL
值敏感的表达式的输入(例如,用
NOT
修饰),这个差异
就会表现出来。
ALL
子查询的工作原理与
ANY
类似。对于外部查询中的某一行,计算子查询,并将表达式
与子查询的每个结果行比较。如果所有的比较结果都为
TRUE
,则
ALL
的结果为
TRUE
;如果
至少有一个比较结果为
FALSE
,则
ALL
的结果为
FALSE
ANY
一样,
ALL
也有一些初看起来并不明显的细微差别。当子查询为空且没有返回任何
行时,
ALL
就会计算为
TRUE
;如果没有一个比较结果返回
FALSE
且至少有一个比较结果返
NULL
,那么
ALL
的结果就是
NULL
ALL
最常见的另一个形式是
<> ALL
,等价于
NOT IN
8.19
 从表中删除数据
DELETE
语句可以删除表中的数据行。该语句提供了一个可选的
WHERE
子句来指定删除哪些
行。若不使用
WHERE
子句,则表中所有数据都会被删除:
DELETE FROM table_name [ WHERE condition ]
有些连接器不支持删除或有限支持删除。例如,
Kafka
连接器不支持删除;
Hive
连接器只
有在
WHERE
子句指定了可用于删除整个分区的分区键时,才支持删除:
DELETE FROM hive.web.page_views
WHERE view_date ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

大数据项目管理:从规划到实现

大数据项目管理:从规划到实现

Ted Malaska, Jonathan Seidman
机器学习流水线实战

机器学习流水线实战

Hannes Hapke, Catherine Nelson

Publisher Resources

ISBN: 9787115560056