Learn your way! Get started

SQL 2012 Developer, Part 01 of 13: Views

with expert Don Kiely

Watch trailer

Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 3/18/2013
Level Intermediate
Runtime 1h 18m
Closed captioning Included
Transcript Included
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included

Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More

Course description

You can use a SQL SELECT statement to read data from one or more tables in a relational database. This is such a common operation that SQL provides a way to save a SELECT statement as a persistent database object, called a view. In this course you’ll learn how to make use of these views. We’ll start by exploring how to create views, reviewing the syntax and the various options you can use. Then we’ll look at the Management Studio tools that help create views. Next you’ll learn how to create a view with a select statement. A computed column in SQL Server is a column that is computed using an expression that uses other fields in the table, a function, or constant values. You’ll learn how to use these columns virtually store data without duplicating it. Next you’ll learn how to use these special indexes to significantly enhance the performance of queries, whether a query uses the underlying view or not.


This course assumes that you have a basic familiarity with the concept of relational databases and a basic understanding of what SQL Server is and the high-level tools in it, as well as how to create and manage objects using Management Studio. You should also have a basic understanding of how SQL Server implements security, including its authentication and authorization schemes, and how to assign permissions on securable objects to principals. You should know the fundamentals of Transact-SQL to write queries to retrieve and update data, and how to execute scripts using the query editor in Management Studio. It will be very helpful, but not absolutely necessary, to have experience with .NET development using Visual Studio 2010 or 2012 for the portions of the course that deal with SQLCLR development. The .NET code included in this course is written in C#, but if you prefer Visual Basic it should be fairly easy to convert the code.

Learning Paths

This course is part of the following LearnNowOnline SuccessPaths™:
SQL Server Developer

Meet the expert

Don Kiely is a featured instructor on many of our SQL Server and Visual Studio courses. He is a nationally recognized author, instructor, and consultant specializing in Microsoft technologies. Don has many years of teaching experience, is the author or co-author of several programming books, and has spoken at many industry conferences and user groups. In addition, Don is a consultant for a variety of companies that develop distributed applications for public and private organizations.

Course outline


Introduction to Views (15:50)
  • Introduction (01:30)
  • Advantages of Views (01:33)
  • Views and Security (01:17)
  • Creating Views (00:50)
  • View Rules (02:03)
  • Views and ORDER BY (02:41)
  • View Syntax and Options (02:21)
  • Check Option (01:08)
  • Other Options (02:05)
  • Summary (00:18)
Tools for Creating Views (10:52)
  • Introduction (00:23)
  • Demo: Creating a View (03:01)
  • Demo: Execute View (00:40)
  • Demo: Test View (00:39)
  • Demo: Modify View (00:41)
  • Demo: Script Select Statement (01:34)
  • Demo: Template (03:25)
  • Summary (00:25)
View Examples (20:49)
  • Introduction (00:22)
  • Demo: Preformat Data (03:10)
  • Demo: Simplify Information (03:12)
  • Demo: Joins and Subqueries (03:14)
  • Nesting Views, Derived Tables (00:54)
  • Demo: Nesting Views (03:21)
  • Using CTEs (01:36)
  • Demo: CTE (01:36)
  • Encrypting View Definitions (00:32)
  • Demo: Encrypting Definitions (02:19)
  • Summary (00:28)
Updating Data Using a View (13:02)
  • Introduction (00:47)
  • Updating Rules (01:49)
  • Updating Behavior (01:38)
  • Demo: Updating Behavior (02:05)
  • Demo: Limitions (03:58)
  • Demo: Update Tables (02:05)
  • Summary (00:37)
Columns and Indexed Views (18:03)
  • Introduction (00:46)
  • Using Computed Columns (01:58)
  • Demo: Computed Columns (02:52)
  • Indexed Views (01:27)
  • How Indexed Views Work (01:17)
  • Performance Benefits (02:17)
  • The Downside (00:59)
  • Indexed View Requirements (02:10)
  • Demo: Indexed View (03:51)
  • Summary (00:22)