Introduction to SQL: Mastering the Relational Database Language, Fourth Edition/20th Anniversary Edition
by Rick F. van der Lans
Chapter 21. Views
Introduction
SQL supports two types of tables: real tables, generally known as base tables, and derived tables, also called views. Base tables are created with CREATE TABLE statements and are the only ones in which data can be stored. Examples are the PLAYERS and TEAMS tables from the tennis club database.
A derived table, or view, stores no rows itself. Instead, it exists, and can be seen, as a prescription or formula for combining certain data from base tables to make a “virtual” table. The word virtual is used because the contents of a view exist only when it is used in a statement. At that moment, SQL executes the prescription that makes up the view formula and presents the user with what seems to be a real table.
This chapter ...
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