Update Query
- UPDATE statement is a DML statement. What does DML stand for?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The ‘UPDATE’ statement in MySQL is a ‘Data Manipulation Language’ statement. It performs edits on real tables present or loaded directly from the stored database. It is used in similar lines with ‘DELETE’.
- What is the value of val2?
UPDATE t SET val1 = val1 + 2, val2 = val1;
-
View Hint View Answer Discuss in Forum
NA
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.