Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

SET Database Object Mode

Use the SET Database Object Mode statement to change the filtering mode of constraints of unique indexes, or to enable or disable constraints, indexes, and triggers.

Only Dynamic Server supports this statement, which is an extension to the ANSI/ISO standard for SQL. To specify whether constraints are checked at the statement level or at the transaction level, see SET Transaction Mode.

Syntax

Read syntax diagramSkip visual syntax diagram                                 (1)
>>-SET--+-| Object-List Format |------+------------------------><
        |                  (2)        |
        '-| Table Format |------------'
 
Notes:
  1. See page Object-List Format
  2. See page Table Format

Usage

In the context of this statement, database object has the restricted meaning of an index, a trigger, or a constraint, rather than the more general meaning of this term that the description of the Database Object Name segment defines in Chapter 5.

The scope of the SET Database Object Mode statement is restricted to constraints, indexes, or triggers in the local database to which the session is currently connected. After you change the mode of an object, the new mode is in effect for all sessions of that database, and persists until another SET Database Object Mode statement changes it again, or until the object is dropped from the database.

Only two object modes are available for triggers and for indexes that allow duplicate values:

For constraints and for unique indexes, you can also specify two additional modes:

At any given time, an object must be in exactly one of these modes. These modes, which are sometimes called object states, are described in the section Definitions of Database Object Modes.

The sysobjstate system catalog table lists all of the constraint, index, and trigger objects in the database, and the current mode of each object. For information on the sysobjstate table, see the IBM Informix Guide to SQL: Reference.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]