Introduction to Database Systems Queries in SQL The select ...
Introduction to Database Systems Queries in SQL The select ...
Introduction to Database Systems Queries in SQL The select ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Nested <strong>Queries</strong>: Comments<br />
• <strong>The</strong> nested formulation of a query is usually executed<br />
less efficiently than an equivalent unnested formulation<br />
(due <strong>to</strong> limitations of the query optimizer).<br />
• <strong>The</strong> nested formulation is sometimes more readable.<br />
• <strong>The</strong> subqueries cannot conta<strong>in</strong> set opera<strong>to</strong>rs (“union is<br />
only performed at the <strong>to</strong>p level”), but this is not a<br />
significant limitation.<br />
75<br />
Nested <strong>Queries</strong>: Example with all<br />
“Persons who have an <strong>in</strong>come that is higher than the <strong>in</strong>come of all<br />
persons younger than 30”<br />
76