Web 開発者は、悪意のあるユーザーがユーザー名やユーザー ID などの入力を求められたときに、SQL ステートメントを入力できないようにしたいと考えています。 次のクエリ最適化手法のうち、SQL インジェクション攻撃を効果的に防ぐのはどれですか?
正解:D
The correct answer is D: Parametrization. Parameterized SQL queries allow you to place parameters in an SQL query instead of a constant value. A parameter takes a value only when the query is executed, allowing the query to be reused with different values and purposes. Parameterized SQL statements are available in some analysis clients, and are also available through the Historian SDK. For example, you could create the following conditional SQL query, which contains a parameter for the collector's name: SELECT* FROM ExamsDigest WHERE coursename=? ORDER BY tagname SQL Injection is best prevented through the use of parameterized queries.