O'Reilly logo

Oracle SQL: A Beginner’s Tutorial by Djoni Darmawikarta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8

Views

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.

Creating and Using 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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required