From the course: Learning SQL Server 2017

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create a view of the data

Create a view of the data - SQL Server Tutorial

From the course: Learning SQL Server 2017

Start my 1-month free trial

Create a view of the data

- [Instructor] Because our data tables are related together using primary and foreign key fields, we can pull information out of multiple tables and piece it together again into a single location. This is called a view, and it's an extremely handy component to any SQL database. To demonstrate how they work, I want to first explore a couple of tables inside of the Wide World Importers database. The first table I want to find is called Sales.Invoices. Let's go ahead and expand it open, and we'll find the Columns folder and expand that open. This is a listing of all the different columns that occur inside of the Invoices table. The InvoiceID is the primary key for the table. And we can tell that based on the icon, as well as the PK here in the description. This table also has a reference to the CustomerID that placed the order. Notice though that there isn't any column that would store address details that we would need in order to deliver the order. Let's go ahead and close up the…

Contents