In my previous posts already I told, sub-query you can use to get single value and multiple values. When Subquery to return only one value so that you can compare the values in one column with a single subquery value. In these cases, you can use comparison operators.
The comparison operators are <,>, =, >=<,<= and <>
In addition, you’re not limited to numbers. Character strings can also be compared in comparison predicates.
Suppose you want to retrieve data from the RETAIL_PRICES table. You want the R_PRICE values to equal the maximum price listed in the S_PRICE column of the SALES_PRICES table. The following query allows you to return the necessary data: