0
我在MYSQL中有两个表,其中table2包含Ids的范围,而table1包含id值。我想分开不在table2范围内的table1 ids。此查询:MYSQL - 不在所有范围
select id
from table1,table2
where table1.id not between table2.start and table2.end
将导致不在至少一个范围之间的id。但我想获得不在所有范围之间的ID。
有什么想法吗?
(我不想使用反连接,因为它需要很多的资源)