Loading topic
= fails when the subquery returns5 min readFROM clause. Oracle runs it, treats its result as a temporary table for the rest of the statement, and discards it afterward. This chapter assumes you can write joins and GROUP BY queries, and that you know the HR sample schema (EMPLOYEES, `DEPARTMENT5 min readSELECT with WHERE, join two tables, and read a correlated subquery. A correlated subquery is an inner query that refers to a column of the outer query. The examples use the Oracle HR sample schema, mainly EMPLOYEES and DEPARTMENTS.5 min readNOT IN can silently return no rows, and how to write the query so it does not.6 min read=, IN, ANY and ALL, and that you know GROUP BY and aggregates. The examples use the Oracle HR sample schem5 min readEMPLOYEES and DEPARTMENTS tables of the Oracle HR sample schema. Everything you already know about subqueries still applies. This chapter covers the new places they can appear: the data sour5 min readEMPLOYEES, DEPARTMENTS). You will name a subquery with the WITH clause, chain several named subqueries, and see how Oracle executes them.5 min readCROSS APPLY and OUTER APPLY syntax needs Oracle Database 5 min readIN/NOT IN, and EXISTS/NOT EXISTS, and that you have run EXPLAIN PLAN at least once. You also need the HR sample schema. The earlier chapters described how a correlated subquery behaves logically: the inner query runs once per outer 6 min read