Q
What does SELECT ... FOR UPDATE do?
-
A
Updates the rows automatically
-
B
Deletes the rows
-
C
Locks the selected rows until the transaction ends
-
D
Copies the rows to a new table
Correct Answer:
C. Locks the selected rows until the transaction ends
Explanation:
It prevents other sessions from modifying the rows until COMMIT or ROLLBACK.