Multiple choice technology programming languages

1)SELECT bus_name, profit 2) FROM business 3) WHERE city = 4) (SELECT city FROM locations 5) WHERE city LIKE 'Noid_' 6) AND state = 'UP') 7) ORDER BY profits desc; How do you modify the above code if you want to avoid causing an error if the subquery returns more than one row.

  1. Change line 1 to read "SELECT DISTINCT bus_name, profits "

  2. Change line 3 to read "where city IN ("

  3. Change line 5 to read "where max (city) LIKE 'NOID%' "

  4. Change line 7 to read "order by city , profits desc "

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

When a subquery returns multiple rows, using the equals operator (=) causes an error. Changing to IN allows matching against any value in the returned set. Option A's DISTINCT would affect duplicates but not the multi-row error. Option C's MAX would change the logic to only match one city. Option D's ORDER BY change doesn't address the core issue.