-
What is the value of val2?
UPDATE t SET val1 = val1 + 2, val2 = val1;
-
- val1 + 1
- unchanged
- updated val1
- previous val1
- None of these
Correct Option: C
The second assignment here (val2 = val1) sets the value of val2 to the updated val1, that is, previous val1 incremented by two. ‘t’ is the name of the table here. ‘val1’ and ‘val2’ are columns.