Home | Previous Page | Next Page   The Embedded SQLJ Language >

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] { DELETE FROM customer WHERE customer_num = :cust_no };

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

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]