EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 597

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 9 SQL Statements
579
DESCRIBE clause If DESCRIBE INTO DESCRIPTOR is used, the
prepared statement is described into the specified descriptor. The describe
type may be any of the describe types allowed in the DESCRIBE statement.
WITH EXECUTE clause If the WITH EXECUTE clause is used, the
statement is executed if and only if it is not a CALL or SELECT statement,
and it has no host variables. The statement is immediately dropped after a
successful execution. If the PREPARE and the DESCRIBE (if any) are
successful but the statement cannot be executed, a warning SQLCODE 111,
SQLSTATE 01W08 is set, and the statement is not dropped.
The DESRIBE INTO DESCRIPTOR and WITH EXECUTE clauses may
improve performance, because they cut down on the required client/server
communication.
WITH VARIABLE RESULT clause The WITH VARIABLE RESULT
clause is used to describe procedures that may have more than one result set,
with different numbers or types of columns.
If WITH VARIABLE RESULT is used, the database server sets the
SQLCOUNT value after the describe to one of the following values:
0 The result set may change: The procedure call should be described
again following each OPEN statement.
1 The result set is fixed. No redescribing is required.
Static and dynamic
For compatibility reasons, preparing COMMIT, PREPARE TO
COMMIT, and ROLLBACK statements is still supported. However, we
recommend that you do all transaction management operations with static
Embedded SQL because certain application environments may require it.
Also, other Embedded SQL systems do not support dynamic transaction
management operations.
SQL/92 Entry level feature
Sybase Supported by Open Client/Open Server.
The following statement prepares a simple query:
EXEC SQL PREPARE employee_statement FROM
’SELECT emp_lname FROM employee’;
Parameters
Standards and
compatibility
Example

Table of Contents

Related product manuals