Previous Topic

Next Topic

Create Rule

Valid in: SQL, ESQL

Create Rule statement defines an Ingres rule. A rule executes a specified database procedure whenever a specified condition is true. For a detailed discussion of the use of rules to enforce referential integrity and security, see the Database Administrator Guide.

Previous Topic

Next Topic

Syntax

The Create Rule statement has the following format:

[EXEC SQL] CREATE RULE [schema.]rule_name table_condition
              [FOR EACH {ROW | STATEMENT}]
              EXECUTE PROCEDURE [schema.]proc_name[(parameter = value
                            {, parameter = value})]

The table_condition has the following format:

BEFORE|AFTER statement_type {, statement_type} ON|OFF|FROM|INTO [schema.]table_name

     [REFERENCING [OLD AS old_corr_name] [NEW AS new_corr_name]]

     [WHERE qualification]


© 2007 Ingres Corporation. All rights reserved.