A Note on Range Variables
Really needed only if the same relation appears twice in the FROM clause. The previous query can also be written as:
SELECT S.sname
FROM Sailors S, Reserves R
WHERE S.sid=R.sid AND bid=103
SELECT sname
FROM Sailors, Reserves
WHERE Sailors.sid=Reserves.sid
AND bid=103
Some folks suggest
using range
variables always!
OR
Previous slide
Next slide
Back to first slide
View graphic version