scalar subquery

A subquery that returns exactly one value, one row and one column, so it can be used wherever a single value can.

In more detail

WHERE price_cents > (SELECT AVG(price_cents) FROM products) compares each product with the overall average. If it returns no rows the value is NULL.

Related terms

Taught in

References