Default Values: The value inserted in any column that is not in the column list is the default value of the column. Columns without a default value must be included in the column list. Similarly, if you insert into a view without an INSTEAD OF INSERT trigger, the default value is inserted into any column of the base table that is not included in the view. Hence, all columns of the base table that are not in the view must have default values.
Assignment: Insert values are assigned to columns in accordance with the assignment rules described in Language elements.
Validity: If the identified table or the base table of the identified view has one or more unique indexes or unique constraints, each row inserted into the table must conform to the constraints imposed by those indexes.
The unique indexes and unique constraints are effectively checked at the end of the statement unless COMMIT(*NONE) was specified. In the case of a multiple-row INSERT, this would occur after all rows were inserted and any associated triggers were activated. If COMMIT(*NONE) is specified, checking is performed as each row is inserted.
If the identified table or the base table of the identified view has one or more check constraints, each check constraint must be true or unknown for each row inserted into the table.
The check constraints are effectively checked at the end of the statement. In the case of a multiple-row INSERT, this would occur after all rows were inserted.
If a view is identified, the inserted rows must conform to any applicable WITH CHECK OPTION. For more information, see CREATE VIEW.
Triggers: If the identified table or the base table of the identified view has an insert trigger, the trigger is activated. A trigger might cause other statements to be executed or raise error conditions based on the insert values.
Referential Integrity: Each nonnull insert value of a foreign key must equal some value of the parent key of the parent table in the relationship.
The referential constraints (other than a referential constraint with a RESTRICT delete rule) are effectively checked at the end of the statement. In the case of a multiple-row INSERT, this would occur after all rows were inserted and any associated triggers were activated.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.