SQL$HELP72.HLB  —  PREPARE  Arguments  statement-id-parameter
    Identifies the prepared version of the SQL statement specified in
    the FROM clause. Depending on the type of SQL statement prepared,
    DESCRIBE, EXECUTE, and dynamic DECLARE CURSOR statements can
    refer to the statement name assigned in a PREPARE statement.

    You can supply either a parameter or a compile-time statement
    name. Specifying a parameter lets SQL supply identifiers to
    programs at run time. Use an integer parameter to contain the
    statement identifier returned by SQL, or a character string
    parameter to contain the name of the statement that you pass
    to SQL.

    A single set of dynamic SQL statements (PREPARE, DESCRIBE,
    EXECUTE, Extended Dynamic DECLARE CURSOR) can handle any
    number of dynamically executed statements. If you decide to
    use parameters, statements that refer to the prepared statement
    (DESCRIBE, EXECUTE, extended dynamic DECLARE CURSOR) must also
    use a parameter instead of the explicit statement name.

    See the DECLARE Dynamic_CURSOR statement for an example
    demonstrating the PREPARE statement used with a dynamic DECLARE
    CURSOR statement.
Close Help