Chapter 11. Views

After completing this chapter, you will be able to

  • Create a view

  • Modify data through a view

  • Create an indexed view

In Chapter 8, and Chapter 9, you learned about the various ways that a SELECT statement could be constructed to retrieve data. Although some SELECT statements are relatively simple, other SELECT statements can be extremely complicated, joining many tables together with multiple levels of joins and data translation. SQL Server has an object called a view that allows you to store complex SELECT statements in your database. In this lesson, you will learn how to create views, modify data through a view, and index a view to improve query performance.

Creating a View

A view is simply a SELECT statement that has been given a ...

Get Microsoft® SQL Server® 2008 Step by Step 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.