1.0

Table Of Contents
By default, SQLFire uses the ascending order of each column to create the index. Specifying ASC after the
column name does not alter the default behavior. The DESC keyword after the column name causes SQLFire
to use descending order for the column to create the index. Using the descending order for a column can help
improve the performance of queries that require the results in mixed sort order or descending order and for
queries that select the minimum or maximum value of an indexed column.
Example
CREATE INDEX idx ON FLIGHTS (flight_id ASC, segment_number
DESC);
CREATE PROCEDURE
Creates a Java stored procedure that can be invoked using CALL PROCEDURE.
Syntax on page 446
Description and Syntax Detail on page 446
Example on page 447
Data-aware procedures on page 448
Syntax
CREATE PROCEDURE
procedure-name
([ procedure-parameter [, procedure-parameter] * ])
LANGUAGE JAVA
PARAMETER STYLE JAVA
{ NO SQL | CONTAINS SQL | READS SQL DATA | MODIFIES SQL DATA }
[ [DYNAMIC]
RESULT SETS
integer]
EXTERNAL NAME 'procedure_external_class.method'
Description and Syntax Detail
CREATE PROCEDURE creates a Java stored procedure that can be invoked using the CALL (PROCEDURE)
on page 435 statement. A procedure is invoked on the current member. Because the procedure is written in Java
code, it can invoke SQL commands using JDBC internally. A qualied procedure name cannot use the SYS
schema, which is reserved for internal usage. The following sections describe the syntax.
procedure-name
[schemaName.]SQL92Identifier
If schemaName is not provided, the current schema is used as the the default schema. If a qualied procedure
name is specied, the schema name cannot begin with SYS.
procedure-parameter
[ { IN | OUT | INOUT } ] [ parameter-name ] DataType
The default value for a parameter is IN. parameter-name must be unique within a procedure.
Note: Data-types such as BLOB, CLOB, LONG VARCHAR, LONG VARCHAR FOR BIT DATA, and
XML are not allowed as parameters in a CREATE PROCEDURE statement.
vFabric SQLFire User's Guide446
vFabric SQLFire Reference