Oracle updating a view

To get the materialized view data up to date you must refresh it.

Remember, it’s important to use a development environment that is a proper match for the production environment.

The SQL UPDATE VIEW command can be used to modify the data of a view.

An updatable view is one which allows performing a UPDATE command on itself without affecting any other table. The view is defined based on one and only one table. The view must include the PRIMARY KEY of the table based upon which the view has been created. The view should not have any field made out of aggregate functions. The view must not have any DISTINCT clause in its definition. The view must not have any GROUP BY or HAVING clause in its definition. The view must not have any SUBQUERIES in its definitions. If the view you want to update is based upon another view, the later should be updatable. Any of the selected output fields (of the view) must not use constants, strings or value expressions.

If you have the Northwind database you can see that it has several views installed by default.

The view "Current Product List" lists all active products (products that are not discontinued) from the "Products" table.

In SQL, a view is a virtual table based on the result-set of an SQL statement.

You must have an account to comment. Please register or login here!