DB2 Version 9.7 for Linux, UNIX, and Windows

CREATE with errors support has been added for certain database objects

Certain objects can now be created even if errors occur during the compilation of their bodies; for example, creating a view when the table to which it refers does not exist.

Such objects remain invalid until they are accessed. CREATE with errors support currently extends to views and inline SQL functions (not compiled functions). This feature is enabled if the auto_reval database configuration parameter is set to DEFERRED_FORCE.

The errors that are tolerated during object creation are limited to the following types:

An object can be created successfully even if there are multiple errors in its body. The warning message that is returned contains the name of the first undefined, invalid, or unauthorized object that was encountered during compilation. The SYSCAT.INVALIDOBJECTS catalog view contains information about invalid objects.

Example

CREATE VIEW V2 AS SELECT * FROM V1
If V1 does not exist, the CREATE VIEW statement completes successfully, but V2 remains invalid.