Error updating view
For a discussion of mergeable and unmergeable views, and more generally, how the optimizer optimizes statements that reference views, see the Examples illustrating the rules for inherently updatable join views, and a discussion of key-preserved tables, are presented in following sections.
The examples in these sections work only if you explicitly define the primary and foreign keys in the tables, or define unique indexes.
As an example, assume that the statement, the database can create the view even if the defining query of the view cannot be executed.
In this case, the view is considered "created with errors." For example, when a view is created that refers to a nonexistent table or an invalid column of an existing table, or when the view owner does not have the required privileges, the view can be created anyway and entered into the data dictionary. To create a view with errors, you must include the .
For information changing conditions and their impact on views, see "Managing Object Dependencies".
SELECT * FROM Division1_staff; ENAME EMPNO JOB DNAME ------------------------------------------------------ CLARK 7782 MANAGER ACCOUNTING KING 7839 PRESIDENT ACCOUNTING MILLER 7934 CLERK ACCOUNTING ALLEN 7499 SALESMAN SALES WARD 7521 SALESMAN SALES JAMES 7900 CLERK SALES TURNER 7844 SALESMAN SALES MARTIN 7654 SALESMAN SALES BLAKE 7698 MANAGER SALES This error message is returned when a view exists but is unusable due to errors in its query (whether it had errors when originally created or it was created successfully but became unusable later because underlying objects were altered or dropped). Additionally, if a view is a join on other nested views, then the other nested views must be mergeable into the top level view.
Base tables might in turn be actual tables or might be views themselves.
You can query, update, insert into, and delete from views, just as you can standard tables.
Views can provide a different representation (such as subsets or supersets) of the data that resides within other tables and views.
When you try to create such a view, the database returns a message indicating the view was created with errors.
If conditions later change so that the query of an invalid view can be executed, the view can be recompiled and be made valid (usable).