Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


CREATE MODULE


Creates a new module.



Usage

Embedded/Interactive/ODBC/JDBC.

Description

If module-name is specified in its unqualified form, the module will be created in the schema which has the same name as the current ident.

If module-name is specified in its fully qualified form (i.e. schema-name.module-name) the module will be created in the named schema (in this case, the current ident must be the creator of the specified schema).

A module is simply a convenient enclosure for the collection of one or more routines that are declared as belonging to the module when it is created.

Language Elements

function-definition, see CREATE FUNCTION.

procedure-definition, see CREATE PROCEDURE.

Restrictions

Two modules with the same name cannot belong to the same schema.

All the functions and procedures declared as belonging to the module must be created in the same schema as the module.

Two functions with the same name cannot belong to the same schema.

Two procedures with the same name cannot belong to the same schema.

It is not possible to create a synonym for a module name.

Notes

The names of the functions and procedures declared as belonging to the module are qualified by using the name of schema to which they belong and not the name of the module.

Example

 @
 CREATE MODULE M1
 DECLARE PROCEDURE PROC_1()
 READS SQL DATA
 BEGIN
 ...
 END;
 DECLARE PROCEDURE PROC_2(IN X INTEGER)
 MODIFIES SQL DATA
 BEGIN
 ...
 END;
 DECLARE FUNCTION FUNC_1() RETURNS INTEGER
 READS SQL DATA
 BEGIN
 ...
 END;
 END MODULE
 @
 

For more information, see the Mimer SQL User's Manual, Creating Functions, Procedures, Triggers and Modules.

Standard Compliance

Standard
Compliance
Comments
SQL-2003
Features outside core
Feature P001, "Stored modules".


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