Loading...
Select Version
You prepare a dynamic cursor description with the PREPARE statement. You define a name, or statement identifier, for the cursor description. Each cursor declared with this statement identifier is assigned the corresponding cursor description.
You specify an alphanumeric host variable for the as yet unknown query expression. The length of the variable must not exceed 32000 characters. You cannot specify an indicator variable.
When the program is executed, you assign the host variable the desired query expression as an alphanumeric string.
Except for the values of the placeholders, the query expression must be known when the PREPARE statement is executed. If the query expression is not correct, the PREPARE statement is aborted with errors.