Intermediate
SQL
Q60 / 100
What is the effect of "SELECT ... FOR UPDATE" in a transaction?
Correct! Well done.
Incorrect.
The correct answer is B) It locks the selected rows so other transactions cannot modify (and in some databases, read) them until the current transaction completes
B
Correct Answer
It locks the selected rows so other transactions cannot modify (and in some databases, read) them until the current transaction completes
Explanation
FOR UPDATE places a row-level lock on the selected rows, preventing concurrent transactions from modifying them until the lock is released, useful for preventing race conditions.
Progress
60/100