select count(cars.carid)
from Cars left join RentalOrders
on cars.CarID=RentalOrders.CarRefwhere carid not in(selectRentalOrders.CarRef from RentalOrders)
when I wrote this above-query for sofiacarrental_v2.2 it shows 30 in the result but when I changed it this query to that:
select count(cars.carid)
from Cars left join RentalOrders
on cars.CarID=RentalOrders.CarRefwhere not exists (select RentalOrders.CarRef from RentalOrders)
I replaced not in with not exists it showed 0 in the result.
there is any point in term of using them or I made a mistake in the second query?
- Edited by Ali mn 10 hours 5 minutes ago