Courseiva
Application Deployment and SecuritymediumMultiple ChoiceObjective-mapped

200-901 Application Deployment and Security Practice Question

A developer needs to prevent SQL injection in a web application. Which coding practice should be used when constructing database queries?

⚠ Common exam trap

Cisco often tests the distinction between input validation and parameterized queries, trapping candidates who think sanitizing input is sufficient, when the secure standard is to use parameterized queries to enforce separation of code and data.

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

Parameterized queries

Parameterized queries (also known as prepared statements) separate SQL logic from data by using placeholders (e.g., `?` in MySQLi or `:name` in PDO). This ensures user input is always treated as data, never as executable SQL code, effectively neutralizing SQL injection attacks regardless of the input content.

Answer analysis

Option-by-option breakdown

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

  • CSRF tokens

    Why it's wrong here

    CSRF tokens prevent cross-site request forgery, not SQL injection.

  • Output encoding

    Why it's wrong here

    Output encoding prevents XSS, not SQL injection.

  • Input validation

    Why it's wrong here

    Input validation helps but may not be sufficient; parameterized queries are the primary defense.

  • Parameterized queries

    Why this is correct

    Parameterized queries ensure user input is treated as data, not executable code.

About these practice questions

One of 989 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.