Multiple choice technology databases

What will be the Output for the Below Query Select * from Retailer where rtrid = (select top 3 Rtrid from retailer)

  1. Return Top 3 Row in the Retailer Table

  2. Return Error

  3. Return No Record

  4. Return all Records from Retailer Table

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

The subquery 'select top 3 Rtrid from retailer' returns multiple rows, but the WHERE clause uses '=' which expects a single value. Comparing a column to multiple rows with '=' causes an error - you should use 'IN' instead for multiple values.