Question discussion

What is the output of the following SQL command if the subquery returns no rows? DELETE FROM Product WHERE ProductID IN (SELECT ProductID F…

359407Medium DSSSB TGT Computer Science 0 replies 0 views
0
What is the output of the following SQL command if the subquery returns no rows? DELETE FROM Product WHERE ProductID IN (SELECT ProductID FROM ArchivedProduct WHERE Status = 'Sell');
  • ANo rows are deleted
  • BAll rows in Product are deleted
  • CRows will be deleted from ArchivedProduct
  • DError
Correct answer: A

Explanation

If the subquery returns no rows, the IN condition is never true, so no rows are deleted.

Discussion 0

Nobody has replied yet. Start the discussion!