You can use a subquery as a filter in a WHERE clause or HAVING clause by using one of the comparison operators (=, <>, <, <=, >, or >=). The important characteristics of a subquery comparison test are:
The subquery can be simple or correlated (see “Simple and Correlated Subqueries” earlier in this chapter).
The subquery’s SELECT-clause list can include only one expression or column name.
The compared values must have the same data type or must be implicitly convertible to the same type (see “Converting Data Types with CAST()” in Chapter 5).
String comparisons may be case-insensitive ...