View

A view is a type of virtual table. The data accessible through a view is not stored in the database as a distinct object. Views are created by defining a SELECT statement. The result set of the SELECT statement forms the virtual table. A user can use this virtual table by referencing the view name in SQL statements in the same way a table is referenced. A view does not contain data of its own but derives (or dynamically displays) data from other tables or views on the basis of the query specified for the view. The tables from which a view derives data are known as base tables. Operations on a view affect its base tables.

The syntax for creating a view is as follows:

CREATE VIEW AS
SELECT
FROM
WHERE

Share

Leave a Reply