CS FundamentalsHardWipro Elite · LTIMindtree

E(n, sal) holds (a, 10), (b, 20), (c, 30), (d, 40). After UPDATE E SET sal = sal + 10 WHERE sal < (SELECT AVG(sal) FROM E), what is SUM(sal)?

  1. A. 110
  2. B. 130
  3. C. 120
  4. D. 140

Correct answer: C. 120

The average (25) is computed before any change, so only a and b (10 and 20) are raised to 20 and 30: new sum = 20 + 30 + 30 + 40 = 120.

More DBMS and SQL questions

Exams that ask this topic