Simple and Correlated Subselects
A simple subselect (or non-correlated subselect) is a subselect that can be evaluated without the use of the outer select. The simple subselect is processed first, before the outer select is processed, and it is processed only once, handing its results to the outer select for processing.In a correlated subselect, the subselect contains a reference to a value from a higher reference, or outer select. This is called the correlated reference, and these columns must use qualified column names to reference the table in the outer select. It is not possible to execute the subselect just once. Instead it must be executed repeatedly, once for each row from the outer select, because the value of the correlated reference will change with each row.
Correlated subselects are more difficult to write and evaluate, but they solve problems that can not be solved in any other way.
Simple subselects and correlated subselects can have the inner and outer selects reference the same table or a different table.
> Go on, and you will see how each type of subselect works.