Host variables

Host variables are variables of the host language (in this case Java™) that appear within SQL statements. A host variable represents a parameter, variable, or field and is prefixed by a colon ( : ), as in the following example:
#sql [ctx] { SELECT INTO customer WHERE customer_num = :cust_no };

You use the SELECT statement with the INTO (as shown in this example), the FETCH statement with the INTO clause (described in Positional iterators), or an accessor method (described in Named iterators) to retrieve data into host variables.