To ensure that the alteration does not affect the view or other objects that depend on it, you can explicitly recompile a view after altering one of its base tables.
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).
For information changing conditions and their impact on views, see "Managing Object Dependencies".
This activity is a magic trick which most audiences find intriguing.
In the trick the demonstrator is “magically” able to figure which one out of dozens of cards has been turned over, using the same methods that computers use to figure out if an error has occurred in data storage.
The column names in an expanded column list are enclosed in quote marks to account for the possibility that the columns of the base object were originally entered with quotes and require them for the query to be syntactically correct.
As an example, assume that the statement, the database can create the view even if the defining query of the view cannot be executed.
When a view is created, Oracle Database expands any wildcard (*) in a top-level view query into a column list.
The resulting query is stored in the data dictionary; any subqueries are left intact.
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 .
When you try to create such a view, the database returns a message indicating the view was created with errors.
We are currently updating the CS Unplugged content and website, click here to preview.