O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and Altering Views

A view is basicallya predefined query (a SELECT statement) that is stored in the database for later use. Therefore, whenever you want to execute this predefined query again, you just have to query the view. The tables that are referenced by the view are called base tables.

For example, suppose there is a complex query that involves many joins, and it is executed frequently by an application. You can create a view that contains this query, and change the application to query this view instead of executing the whole query.

Caution

Views are often called virtual tables. Be careful when using this terminology because some special system tables in SQL Server are kept in memory; these are called virtual tables.

Benefits ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required