Courseiva
Application Deployment and SecuritymediumMultiple ChoiceObjective-mapped

200-901 Application Deployment and Security Practice Question

A developer is writing a web application and wants to prevent SQL injection attacks. Which coding practice should be followed when constructing SQL queries?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use parameterized queries with prepared statements

Using parameterized queries ensures that user input is treated as data, not executable code, preventing SQL injection.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use parameterized queries with prepared statements

    Why this is correct

    Parameterized queries safely separate SQL logic from data.

  • Use stored procedures exclusively

    Why it's wrong here

    While stored procedures can reduce certain SQL injection vectors by parameterising inputs, they do not inherently prevent injection if dynamic SQL is executed within the procedure or if concatenation is used inside the procedure body. The scenario requires a practice that reliably separates SQL code from data, which parameterised queries or prepared statements achieve by sending the query structure and parameters separately to the database engine. Stored procedures are tempting because they encapsulate business logic and can enforce database permissions, making them a correct choice for access control or code organisation, but they do not guarantee injection prevention without disciplined parameterisation.

  • Encode user input with base64 before inserting into SQL

    Why it's wrong here

    Base64 encoding does not prevent SQL injection; the query still treats it as SQL.

  • Concatenate user input directly into SQL statements

    Why it's wrong here

    This is vulnerable to SQL injection.

About these practice questions

This 200-901 question is part of Courseiva's 989-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.