Deal of the Day

Friday 15 July, 2011

Host Variable

Host Variable Usage

Host variables are used in SQL statements to pass values between the database and the application program.

Using Variables in Statements
Host variables may be used:
·         to receive information from the database (SELECT INTO, FETCH, CALL and SET statements)
·         to assign values to columns in the database (CALL, INSERT and UPDATE statements)
·         to manipulate information taken from the database or contained in other variables (in expressions)
·         in dynamic SQL statements.

In all these contexts, the data type of the host variable or database column must be compatible with the data type of the corresponding database value or host variable.

Note: The colon is not part of the host variable name, and should not be used when the variable is referenced in host language statements.

Do write me @ iSeriesblogs@gmail.com for any query or you can simply post comments below.

Happy Learning

No comments:

Post a Comment