1
我有表A,B,C,其中A表示可以有零个或多个子项目存储在C中的项目。B表只有2个外键连接A和C.是否有替代方法来编写此查询?
我有这个SQL查询:
select * from A
where not exists (select * from B natural join C where B.id = A.id and C.value > 10);
它说:“给我从表格中的每一个项目,所有子项具有值小于10
有没有办法来优化这一点,有没有写这个办法?不使用exists
运营商?