我有这张桌子:
select count(distinct clean_deep_link) from tbl_1;
+---------------------------------+
| count(distinct clean_deep_link) |
+---------------------------------+
| 121211 |
+---------------------------------+
我有这个查询:
select count(1) from tbl_1 where clean_deep_link IN
(select clean_deep_link from tbl_2);
+----------+
| count(1) |
+----------+
| 66360 |
+----------+
但是当我将查询更改为它时,not in
它返回一个空集:
select count(1) from tbl_1
where clean_deep_link not in (select clean_deep_link from tbl_2);
+----------+
| count(1) |
+----------+
| 0 |
+----------+
这怎么可能?如果子查询包含大约一半的记录,not
子查询的不应该包含另一半吗?我在这里想念什么?
谢谢