Given the query…
UPDATE
Table1
SET
col1 = col1 + 1,
col2 = col1 * 2
WHERE
colID = 1
…if col1 equals 1 before the query is executed, will col2 be set to 2 or 4 after the query is executed?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just give it a try. But here you go:
http://sqlfiddle.com/#!2/7b6de/1
Col2 updates to 4.
Good luck.