← Quiz: Node, Express and REST: all 10 questions
Quiz: Node, Express and REST · Question 10 of 10
Why should SQL queries use parameters instead of joining strings with user input?
Why should SQL queries use parameters instead of joining strings with user input?
- A.Parameters make queries shorter
- B.It prevents SQL injection
- C.Databases reject string concatenation
- D.It removes the need for validation
Answer & explanation
Correct answer: It prevents SQL injection
The database treats parameter values as data, never as SQL code.
Can you get the rest right without peeking?
Take the timed Quiz: Node, Express and REST quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →