adplus-dvertising
frame-decoration

Question

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

a.

previous val1

b.

updated val1

c.

unchanged

d.

val1 + 1

Posted under MySQL Database

Answer: (b).updated val1

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the value of val2 in the following MySQL statement?

Similar Questions

Discover Related MCQs

Q. UPDATE statement is a DML statement. What does DML stand for?

Q. Which keyword in the UPDATE statement is used to assign values to columns?

Q. Which keyword is used to delete all the rows from the table?

Q. What is known as the set of SQL statements that either executes successfully or none of them have an effect?

Q. What is generally done after the transactions are executed successfully?

Q. What is generally done if an error occurs during the transaction?

Q. What does ā€˜Aā€™ stand for in the ACID property of transactions?

Q. What does ā€˜Cā€™ stand for in the ACID property of transactions?

Q. What is the command to disable autocommit and launch a transaction?

Q. Transactional processing provides strong guarantees about the outcome of operations.

Q. Transactional processing requires lesser overhead due to CPU cycles and memory.

Q. What is the durability property of transactions?

Q. How many storage engines among the following are transaction-safe?

InnoDB, Falcon, MyISAM, MEMORY

Q. Which key declares that an index in one table is related to that in another?

Q. Foreign keys cannot handle deletes and updates.

Q. Deletion of an employee from table also deletes that employee from another table. This kind of delete is called ____________

Q. Which storage engine in MySQL provides foreign key support?

Q. The property of InnoDB that enforces foreign key relationships stay intact is called _____________

Q. Which clause names the parent table and the index columns in the table?

Q. If the storage engine InnoDB is not used, foreign key cannot be used.