A view is effectively a predefined query. You create and use views most frequently for the following purposes:
▪ Hiding table columns (for security protection)
▪ Presenting pre-computed columns (in lieu of table columns)
▪ Hiding queries (so that the query outputs are available without running the queries)
This chapter discusses view and presents examples of views.
You create a view using the CREATE VIEW statement. Here is its syntax.
CREATE VIEW view_name (columns) AS SELECT ... ;
The SELECT statement at the end of the CREATE VIEW statement is the predefined query. When you use a view its predefined query is executed. Since a query result is a table that is not persisted (stored) in the database, ...