Exists or not
Many comparison conditions are applicable to subqueries. A subquery syntax diagram is shown in Figure 12.1. The type of results allowed from a subquery depends on the comparison operator that you use. In Figure 12.1, the highlighted operators require single-row subqueries. This includes the equality and inequality operators (=, <=, >=, >, <, and !=), plus the LIKE and BETWEEN operators. Other operators allow multiple rows to be returned from the subquery. Multiple rows are allowed for the IN, NOT IN, EXISTS, NOT EXISTS, plus equality operators combined with ANY, SOME, or ALL.
We now know about different types of subqueries, where subqueries can be used, and some basic comparison condition syntax for using subqueries.