a query within a query where the inner query is evaluated for each row in the outer query
a SELECT statement inside the WHERE clause of a SQL statement (SELECT, INSERT, or DELETE) which is correlated (or makes reference) to one or more columns in the enclosing SQL statement
a SELECT statement nested inside another SELECT statement where the inner query contains a reference to one or more columns in the outer query
a SELECT statement nested inside another T-SQL statement, which contains a reference to one or more columns in the outer query
a subquery that contains a reference to a column that also appears in the outer query
a subquery that is evaluated once for each row processed by the parent statement
a subquery that refers to one or more tables outside of the subquery expression
a subquery which contains a reference to a column which is also in the outer query
A subquery with a subquery within which is referenced by an outer main query. Correlated subquries cannot stand alone, they depend on the outer query. SELECT * FROM STUDENT S WHERE EXISTS (SELECT g.student_number FROM Grade_report g WHERE grade = 'B' AND s.stno = g.student_number); Non-correlated version: SELECT * FROM STUDENT S WHERE s.stno IN (SELECT g.student_number FROM Grade_report g WHERE grade = 'B');
A subquery that contains a correlated reference to a column of a table that is outside of the subquery.