Skip to content

Tag: prepared-statement

Reuse a parameter in a PreparedStatement?

I am passing a parameter to a PreparedStatement like this : And the query looks like this : Now I want to modify my query like this, and reuse the first parameter (both ? would use the runId parameter) : Is that possible without doing this : Answer This cannot be done with plain JDBC. You could instead use Sp…