Subqueries Returning Relations
SELECT Company.name
FROM Company, Product
WHERE Company.name=maker
AND Product.name IN
(SELECT product
FROM Purchase
WHERE buyer = ‘Joe Blow’);
Find companies who manufacture products bought by Joe Blow.
You can also use: s > ALL R
s > ANY R
EXISTS R
Previous slide
Next slide
Back to first slide
View graphic version