Skip to content
Sharp

System Design · interview question

You are reviewing a codebase and spot a potential security issue. Which practice is most effective for mitigating SQL injection vulnerabilities?

Multiple choiceEasychapter-20-curatedpremiumsystem-designdefending-tradeoffs
Choose one answer
Answer and explanation

Correct answer

C. Using prepared statements with parameterized queries.

Why

Prepared statements with parameterized queries prevent SQL injection by separating SQL logic from data, ensuring that user inputs are treated as data, not executable code.

Test yourself on System Design

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

Start free test
All System Design questions →