Skip to content
Sharp

Data Access · interview question

A bug appears around parameterized queries. What is the strongest first debugging move?

Multiple choiceMediumchapter-11-curatedpremiumdata-accessparameterized-queries
python
connection.execute(
    "SELECT id FROM orders WHERE customer_id = ?",
    (customer_id,),
)
Choose one answer
Answer and explanation

Correct answer

D. Trace one concrete example, inspect the state transitions, and compare them to the intended rule before rewriting anything.

Why

That approach is reliable because it creates evidence. String interpolation in SQL is one of the fastest ways to create injection risk and brittle query code.

Test yourself on Data Access

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

Start free test
All Data Access questions →