I have a some query, but I am not sure if I should pass '?'
in the query. Or should I treat it like a variable and just set the "b."+ name
in the statement itself.
Select x,y,z
FROM someTable
WHERE ....
UNION
SELECT a.x, a.y, a.z
FROM someTable a, someTable b
WHERE a.id = ?
AND b.seq = a.seq
AND UPPER(b.?) // is this correct???
LIKE ?
if I change above that line to AND UPPER(?)
then set statement...
statement.setString(x, "b."+customString);
or should I do this instead? AND UPPER(b.?)
statement.setString(x, customString); //or this?
Is the outcome the same? are there any unexpected behavior for either way?