- Home
- All questions
- Question 140
CompTIA Security+ study material · question 140 of 611
Which technique is the primary defence against SQL injection, and why does it work?
Show the answer
Answer: A. Parameterised queries, because the database learns the query structure before it sees the data
With the structure fixed in advance, supplied values can never change the query's meaning. The others reduce impact or add depth.
Source: OWASP SQL Injection Prevention Cheat Sheet (OWASP) — OWASP SQL Injection Prevention Cheat Sheet › Defense Option 1