R

Ritu Nagar • 4.39K Points
Extraordinary

Q. What is the value of val2 in the following MySQL statement?
UPDATE t SET val1 = val1 + 2, val2 = val1;

  • (A) previous val1
  • (B) DROP
  • (C) unchanged
  • (D) val1 + 1
  • Correct Answer - Option(B)
  • Views: 67
  • Filed under category MySQL

Explanation by: Ritu Nagar
This MySQL statement uses the UPDATE command to modify the values in a table named 't'. Let's break down what's happening:

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics