Skip to content
Sharp

SQL for Java Devs · interview question

Which statement about using PreparedStatements in transactions is true?

Multiple choiceMediumchapter-8-curatedpremiumsql-for-java-devspreparedstatements
Choose one answer
Answer and explanation

Correct answer

B. They can be used in the context of a single transaction.

Why

PreparedStatements can be used within a transaction context, where multiple operations can be executed together. This allows for better control over committing or rolling back the entire set of operations.

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 →