奇怪的事情发生了。我在 Windows NOT IN查询上安装的 MySQL Community Server 5.1 有问题。当我执行此查询时:
select *
from table1
where date >= "2012-01-01";
返回 582 行
select *
from table1
where date >= "2012-01-01"
and the_key in (select some_key from table2);
返回 15 行
所以我希望以下查询将返回 582 - 15 = 567 行
select *
from table1
where date >= "2012-01-01"
and the_key not in (select some_key from table2);
返回 0 行
为什么最后一个查询没有返回任何行?