What Are Parameterized Queries?
Think of parameterized queries like a function with arguments — the query plan is the function, and parameters are the arguments. You define the SQL structure once with placeholders, and swap in different values each time you call it.
Static query (hardcoded)
sql
SELECT * FROM ETHEREUM.CONTRACTSWHERE CONTRACT_CREATOR_ADDRESS = 0xabc123...Parameterized query
sql
SELECT * FROM ETHEREUM.CONTRACTSWHERE CONTRACT_CREATOR_ADDRESS = $1How placeholders work
$1, $2, etc. are replaced with actual values at runtime. The query plan is generated once from the parameterized SQL and reused with any set of parameter values.