Wednesday 02 December 2026 18:56:36 GMT+01:00

Netcrook

HomeManifesto
News
Techcrook
Geocrook
WikicrookTeamAppContact
EnglishItaliano

WIKICROOK

Parameterized Query

A query pattern that separates code from input, reducing the risk that user data is executed as SQL.

A parameterized query is a database query built in two parts: the SQL logic and the user-supplied values. The code defines the structure of the statement first, and the input is bound later as data, not as executable SQL. This separation is a core defense against SQL injection, because it prevents crafted text from changing the meaning of the query.

In practice, defenders use parameterized queries in applications, APIs, and enterprise platforms anywhere user input reaches a database. Attackers look for places where developers concatenate strings into SQL instead, especially in search forms, login pages, and report filters. Safe parameterization, often combined with host variables or prepared statements, makes injection much harder and keeps sensitive business data from being exposed or modified through a malicious query.

← WIKICROOK index