This statement is an extension to the ANSI/ISO standard for SQL.
>>-START VIOLATIONS TABLE FOR--table----------------------------> >--+----------------------------------------------+-------------> | (1) | '-USING--+--------violations-----------------+-' | (2) | '--------violations--,--diagnostics-' >--+---------------------------------+------------------------->< | (2) | +--------MAX ROWS--num_rows-------+ | (1) | '--------MAX VIOLATIONS--num_rows-'
Element | Description | Restrictions | Syntax |
---|---|---|---|
diagnostics | Declares the name of a diagnostics table to be associated with the target table. Default name is table_dia. | Must be unique among names of tables, views, sequences, and synonyms | Database Object Name, p. Database Object Name |
num_rows | Maximum number of rows database server (IDS) or any single coserver (XPS) can insert into violations when a single statement is executed on table | Must be an integer in range from 1 to the maximum value of the INTEGER data type | Literal Number, p. Literal Number |
table | Target table for which violations and (for Dynamic Server only) diagnostics are to be created | If USING clause is omitted, no more than 124 bytes | Database Object Name, p. Database Object Name |
violations | Violations table to be associated with table. Default name is table_vio. | Same restrictions as diagnostics | Database Object Name, p. Database Object Name |
The database server associates the violations table (and for Dynamic Server only) the diagnostics table) with the target table that you specify after the FOR keyword by recording the relationship among the three tables in the sysviolations system catalog table. In Extended Parallel Server, the START VIOLATIONS TABLE statement creates a violations table, but no diagnostics table is created.
A target table must satisfy these requirements:
The START VIOLATIONS TABLE statement creates the special violations table that holds nonconforming rows that fail to satisfy constraints and unique indexes during insert, update, and delete operations on target tables. This statement also creates the special diagnostics table that contains information about the integrity violations that each row causes in the violations table.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]