Yes, you can do that. The value of someHostVar
will be overwirtten and contain whatever the value of someCol
is for this particular predicate - unless the value of someCol
happens to be NULL at which point it the host variable remains unchanged.
Even though you can do this, I would suggest to you that this is not a good practice because someHostVar
may end up containing values for different columns of the same table - too easy to screw up.