12 - Chapter 6 - Subqueries
12 - Chapter 6 - Subqueries
Session 13
Chapter 6 – Subqueries
Objectives
4 Correlated subqueries
Note: You can not run the above code in SQL Server but in
Oracle, DB2, MySQL
4 - Correlated Sub-Queries
SELECT name
FROM movieExec,
(SELECT producerC#
FROM movies, starsIn
WHERE title = movieTitle
AND year = movieYear
AND starName = ‘Harrison
Ford’
) as Prod
WHERE cert# = Prod.producerC#