Skip to content
Sharp

SQL for Java Devs · interview question

In a JDBC application, how can you ensure that two transactions do not interfere with each other when updating the same row?

Multiple choiceHardchapter-8-curatedpremiumsql-for-java-devstransactions
Choose one answer
Answer and explanation

Correct answer

B. Use SERIALIZABLE isolation level

Why

Using the SERIALIZABLE isolation level ensures that transactions are executed in a completely isolated manner. This prevents any interference between transactions, even when they are updating the same row.

Test yourself on SQL for Java Devs

A free test with instant, explained results. No account needed.

Start free test
All SQL for Java Devs questions →