Question 3Asked in DSSSB TGT Computer Science (Technical), 13 Sep 2025, Shift 3 (5:00 PM)

What is the output of the following SQL command if the subquery returns no rows?

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');
  1. ANo rows are deleted
  2. BAll rows in Product are deleted
  3. CRows will be deleted from ArchivedProduct
  4. DError
Show answerHide answer

Correct answer: (A) No rows are deleted

Explanation

If the subquery returns no rows, the IN list is empty and the condition is false for every row, so no rows are deleted from Product and no error occurs.

From DSSSB TGT Computer Science PYQ (Technical), 13 Sep 2025, Shift 3 (5:00 PM)

This is question 3 of DSSSB TGT Computer Science PYQ (Technical), 13 Sep 2025, Shift 3 (5:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.