Multiple choice

How many values can a subquery use with the <> operator return?

  1. Only 1

  2. Up to 2

  3. Up to 10

  4. Unlimited

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The <> (not equal) operator is a single-row comparison operator in SQL, meaning the subquery must return exactly one value. When a subquery returns multiple rows with comparison operators like =, <>, >, <, Oracle raises error ORA-01427 'single-row subquery returns more than one row'. For multiple values, you must use IN, ANY, or ALL operators instead.