209k views
1 vote
Which of the following are true regarding parameterized queries?

a. debug application code are pre-compiled
b. sql statements help prevent
c. sql injection attacks perform a quick review of code
d. discover code vulnerabilities

1 Answer

1 vote

Final answer:

The correct answer is that parameterized queries help prevent SQL injection attacks, as they separate user input from SQL code, enhancing security.

Step-by-step explanation:

The correct answer is option B: SQL statements help prevent SQL injection attacks. Parameterized queries are a way of structuring SQL statements so that user input is treated distinctly from the SQL code itself.

These types of queries require database developers to define all the SQL code first and then pass in each parameter to the query later, which helps to prevent vulnerabilities such as SQL injection attacks. Using parameterized queries, the database distinguishes between code and data, regardless of what user input is supplied.

This technique is opposed to constructing a query as a string with user input included, which can potentially be manipulated to alter the SQL commands and compromise data security.

User Dwedit
by
8.5k points