Using Views to Access Data

A view is nothing more than a virtual table whose columns are defined by using a SELECT statement. As with a real table, a view consists of a set of named columns and rows of data. However, a view does not actually exist as a physical table in the database. The rows and columns of data come from the tables referenced in the SELECT statement that defines the view, and are produced dynamically whenever the view is referenced.

Views enable you to look at data in the database without duplicating that data. A view provides you with a method to filter the data referenced in the SELECT statement used to define the view. This SELECT statement can reference one or more tables or other views in the current database or other databases. ...

Get Sams Teach Yourself Transact-SQL in 21 Days, 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.