This slide show presents more information about views.
Here I created a view from two tables. Once it was created I showed the describe and the data.
The CREATE OR REPLACE VIEW is very convenient but also should be used carefully so that you do not mistakenly replace a view that you wanted to maintain.
This view renames the data. I only used one table but the information could have come from multiple tables. Note: If the names were not listed then the SELECT would provide the names. Note also that when listing the columns they need to parallel the names in the select.
I am now creating a view to update. The view has selected certain columns and certain rows from new_first_pay. The resulting view is called new_payview1.
Note that advanced techniques are needed if there are multiple table joins to create the view. This example has only one table behind the view.
This slide simple prepares a view that I can used to update and illustrate the impact on the two tables.
When the data in the table is updated, the view is automatically updated since the data is retrieved from the tables to create the views.
This puts a named constraint on the view.
When changes are made to tables, the view is impacted if records no longer mean view requirements or constraints.
This offers some measure of data security. The person using this view cannot alter the view.
Views are easy to create. If they will not be used on an ongoing basis, they should be dropped from the dictionary.