What Is a View?

A view is a virtual table. That is, a view looks like a table and acts like a table as far as a user is concerned. A view is actually a composition of a table in the form of a predefined query. For example, a view can be created from the EMPLOYEE_TBL table that contains only the employee's name and address, instead of all columns in the EMPLOYEE_TBL table. A view can contain all rows of a table or select rows from a table. A view can be created from one or many tables.

A view is a predefined query that is stored in the database, has the appearance of an ordinary table, and is accessed like a table, but does not require physical storage.

When a view is created, a SELECT statement is actually run against the database, which defines ...

Get Sams Teach Yourself SQL in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.