Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


CREATE STATEMENT


Stores a precompiled statement in the data dictionary for execution later.



Usage

Embedded/Interactive/ODBC/JDBC

Description

The statement specified, stored with the name statement-name, is compiled and optimized and thereafter stored in its compiled form in the data dictionary.

The statement can then be executed through the EXECUTE STATEMENT command.

You can use the SCROLL option to specify that the result-set should be read by a scrollable cursor.

If you use the NO SCROLL option, the result-set will only be accessible for no-scroll cursors.

If you do not specify an option, the result-set can be used by both scroll and no-scroll cursors.

Once the precompiled statement has been created, only cursors with the correct scroll mode can be used to read the result-set.

Language Elements

select-statement, see SELECT.

call-statement, see CALL.

Data manipulation statements, e.g. UPDATE, INSERT or DELETE.

Restrictions

The ident executing the CREATE STATEMENT command must have adequate access rights to perform the stored command.

Notes

The statement-name must not be the same as any other statement name in the schema.

Parameter marker references may be used in the statement to denote values that are supplied when the statement is executed. Parameter markers can either be a ? or on the from :variable.

Examples

 CREATE SCROLL STATEMENT seltaba
 SELECT col1, col2
 FROM taba WHERE col3 < 10
 
 CREATE STATEMENT updtaba
 UPDATE taba SET col2 = :inpvar
 WHERE col3 < :col3var
 
 CREATE STATEMENT callme
 CALL proc1('ABC', ?)

Standard Compliance

Standard
Compliance
Comments

Mimer SQL extension
The CREATE STATEMENT command is a Mimer SQL extension.


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX