I'm trying to update the status of all airplanes, using a subquery, to 'OUT' who are currently out and have not returned. My foreign key is PLANE_NUM. I'm trying it like this but I've got an error:
UPDATE plane
SET STATUS='OUT'
WHERE PLANE_NUM
IN (SELECT *
FROM plane p, flight f
WHERE p.PLANE_NUM = f.PLANE_NUM
AND FLIGHT_RETURNDATE IS null);