gpt4 book ai didi

sql - 反连接和反半连接有什么区别?

转载 作者:搜寻专家 更新时间:2023-10-30 19:41:15 26 4
gpt4 key购买 nike

来自 http://www.dbspecialists.com/files/presentations/semijoins.html

An “anti-join” between two tables returns rows from the first table where no matches are found in the second table. An anti-join is essentially the opposite of a semi-join: While a semi-join returns one copy of each row in the first table for which at least one match is found, an anti-join returns one copy of each row in the first table for which no match is found.

不是反半连接而不是反连接“返回第一个表中没有找到匹配项的每一行的一个副本”吗?

如果是,反加入的定义是什么?

请注意,我的问题是一般的 SQL 级别,例如大学教科书中关于数据库概念的级别,而不是特定于特定 SQL RDBMS 实现的问题

谢谢。

最佳答案

反半连接就是反连接。

The antijoin can also be defined as the complement of the semijoin, as follows:

R ▷ S = R − R ⋉ S

Given this, the antijoin is sometimes called the anti-semijoin, and the antijoin operator is sometimes written as semijoin symbol with a bar above it, instead of ▷.

参见 https://en.wikipedia.org/wiki/Relational_algebra#Antijoin_.28.E2.96.B7.29

关于sql - 反连接和反半连接有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40597054/

26 4 0