Contents IndexDROP HLI Statement FETCH HLI Statement

User's Guide
   Part V. The SQL Anywhere Programming Interfaces
     Chapter 38. The WSQL HLI Interface
      EXECUTE HLI Statement

Syntax

     1. EXECUTE statement-name [ USING hostvariablelist ]

     statement-name:    identifier, or host variable

     2. EXECUTE IMMEDIATE statement

     statement:    string or host variable

Purpose

To execute a SQL statement that is not a query (SELECT).

See also

PREPARE, DECLARE, DROP.

Description

This command executes a SQL statement. Format 1 executes a named statement which has been prepared. The prepared statement may contain host variable parameters. If it does, and no :keyword.USING clause is specified, then the values of the host variables named in the statement will be requested. If a USING clause is specified, then the parameters will be set to the values of the host variables in the list. The number of host variables in the list must match the number of host variable parameters specified in the statement.

Format 2 will take a SQL statement and PREPARE, EXECUTE and DROP it. The statement in Format 2 is specified as a string with single quotes, or as a host variable.

Any SQL statement except a SELECT statement may be executed.

This command is functionally similar to the Embedded SQL command EXECUTE. See "EXECUTE statement".

Contents IndexDROP HLI Statement FETCH HLI Statement