Chapter 16. Quantified Subquery Predicates

A QUANTIFIER IS A logical operator that states the quantity of objects for which a statement is TRUE. This is a logical quantity, not a numeric quantity; it relates a statement to the whole set of possible objects. In everyday life, you see statements like “There is only one mouthwash that stops dinosaur breath,” “All doctors drive Mercedes,” or “Some people got rich investing in cattle futures,” which are quantified.

The first statement, about the mouthwash, is a uniqueness quantifier. If there were two or more products that could save us from dinosaur breath, the statement would be FALSE. The second statement has what is called a universal quantifier, since it deals with all doctors—find one exception ...

Get Joe Celko's SQL for Smarties, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.