1.1

Table Of Contents
READS SQL DATA
Indicates that some SQL statements that do not modify SQL data can be included in the stored procedure.
MODIFIES SQL DATA
Indicates that the stored procedure can execute any SQL statement except statements that are not supported in
stored procedures.
Example
CREATE PROCEDURE SALES.TOTAL_REVENUE(IN S_MONTH INTEGER,
IN S_YEAR INTEGER, OUT TOTAL DECIMAL(10,2))
PARAMETER STYLE JAVA READS SQL DATA LANGUAGE JAVA EXTERNAL NAME
'com.sqlfire.funcs.Revenue.calculateRevenueByMonth';
Data-aware procedures
A Data-Aware Procedure is created using the same CREATE PROCEDURE syntax as specied above. The
difference for a data-aware procedure is in the way that the procedure is invoked with CALL on page 460 and
the way the procedure is implemented. For more information see Using Data-Aware Stored Procedures on page
153, and for information on implementing your own data-aware procedures, see Using the Procedure Provider
API on page 159.
CREATE SCHEMA
Creates a schema with the given name which provides a mechanism to logically group objects.
Syntax
CREATE SCHEMA schema-name [ DEFAULT SERVER GROUPS ( server_group_name [ ,
server_group_name ] * ) ]
Description
This creates a schema with the given name which provides a mechanism to logically group objects by providing
a namespace for objects. This can then be used by other CREATE statements as the namespace prex. For
example, CREATE TABLE SCHEMA1.TABLE1 ( ... ) will create a table TABLE1 in the schema SCHEMA1.
The DEFAULT SERVER GROUPS for a schema species the server groups used by the CREATE TABLE
statement by default when no explicit server groups have been mentioned.
Note: Specifying the default server groups for a schema does not limit tables in that schema to be in those
server groups, it just species the default server groups for tables in that schema.
The CREATE SCHEMA statement is subject to access control when the sqlre.sql-authorization property is set
to true for the system. Only the system user can create a schema with a name different from the current user
name, and only the system user can specify AUTHORIZATION user-name with a user-name other than the
current user name.
There is no single owner of the entire distributed system. Instead, ownership is dened by the distributed member
joining the system. The distributed member process must boot up using theuser attribute in the properties to
indicate owner of that process. A member that boots in this way can create a schema or grant access to a schema
across the distributed system.
Example
CREATE SCHEMA myschema DEFAULT SERVER GROUPS
(srvrgrp1,srvrgrp2);
475
SQL Language Reference