Updating data in a view oracle
However, if you try to query the Oracle VIEW after the table has been dropped, you will receive a message indicating that the Oracle VIEW has errors.If you recreate the table (the table that you had dropped), the Oracle VIEW will again be fine.You can use DML operations on a view if the view does not include Group by, Start with, Connect by, Distinct clauses or any subqueries and set operations(Union, union all, intersect and minus).Views are saved SELECT statements that allow you to operate on the results that are returned from them.Views have never in the past been able to contain parameters; however, as shown later in the chapter, user-defined functions can now be used like views, effectively allowing you to create parameterized views that return different results depending on the parameter values that get passed in each time the function is run.Unlike stored procedures (which also support parameters), these parameterized functions can be updateable, as you'll see later in this chapter.They can be used to provide row- or column-level access to data, to wrap up complex joins, to perform complex aggregate queries, and to otherwise customize the display of data. In this chapter, learn how to define, create, and modify views, and how to perform index analysis and optimize performance in SQL Server. The biggest problem is that just when you get used to accepting a limitation, Microsoft comes up with an amazing, new feature that overcomes it!
Using a view to filter data on the server is much more efficient than fetching an entire table and then applying a filter on the client. One reason it's recommended that the dbo own all objects in a database is that problems arise when the chain of ownership is broken.
The view will become invalid whenever the base table is altered.
We can recompile a view using the Alter view statement, but oracle automatically recompiles the view once it is accessed.
The information about where the data in a view comes from and how it is pulled together from various tables is all encapsulated inside the view. Here are some general guidelines for creating views: Views are frequently used as security mechanisms to prevent users from having direct access to tables while still allowing them to work with data.
Tables can be customized and tailored to the needs of the users by way of views. All permissions can be removed from the underlying tables, and as long as the owner of the table is the same as the owner of the view, the user will be able to interact with the data based on the permissions granted to the view.