SUBQUERIES
SUBQUERIES Subqueries are used to structure queries. In many cases, a subquery can be used instead of a JOIN (and vice versa). For database systems fully compliant with the SQL 92 standard, a subquery can also be used to provide one or more values in the SELECT clause. In most database systems, subqueries are typically part of the WHERE clause, as follows: WHERE column IN (subquery WHERE column <comparison> (subquery) WHERE EXISTS (subquery) The subqueries themselves are complete SELECT statements, enclosed in parentheses. Examples IN Find the price of all products in a particular category, for example condiments. Type this query in the SQL window and check against the result shown below: ...