Introducing Views
A view is often referred to as a virtual table, which means that a view looks like a table and is referenced like a table. However, views do not contain data like tables do. The only storage required for a view is the storage to maintain the definition of the view. A view is defined by a query on one or more database tables. A view is nothing more than a predefined query. Views are created by using the CREATE VIEW statement. After the view has been created, you can use the following SQL commands to refer to that view:
SELECT
INSERT
UPDATE
DELETE
Note
We used Personal Oracle to generate today's examples. MySQL, as well as some other implementations, do not support views. Please see the documentation of your specific SQL implementation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access