p.189
"Find the names of sailors who have reserved a red or a green boat"
SELECT S.sname
FROM Sailors S, Boats B, Reserves R
WHERE S.sid = R.sid AND R.bid = B.bid
AND (B.color = 'red' OR B.color = 'green')
Careful: can you change OR to AND?
Previous slide
Next slide
Back to first slide
View graphic version