Views are virtual tables that are defined by a SQL query and allow users to structure, restrict access to, and summarize data from tables. Views are created using the CREATE VIEW statement and can be built from one or more tables or other views to select specific rows and columns. Views help users access data in an intuitive way while restricting access to only necessary information.
1 of 8
Download to read offline
More Related Content
VIEWS.pptx
1. VIEWS:
1. A view is nothing more than a SQL statement that is stored in the database with an associated name. A view is
actually a composition of a table in the form of a predefined SQL query.
2. 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 which depends on the written SQL query to create a view.
Views, which are a type of virtual tables allow users to do the following
Structure data in a way that users or classes of users find natural or intuitive.
Restrict access to the data in such a way that a user can see and (sometimes) modify exactly what they need
and no more.
Summarize data from various tables which can be used to generate reports.
2. 1. Creating Views
Database views are created using the CREATE VIEW statement. Views can be created from a single table, multiple
tables or another view.
To create a view, a user must have the appropriate system privilege according to the specific implementation.
The basic CREATE VIEW syntax as follows