From the course: Learning Microsoft SQL Server 2022

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Create a view of the data

Create a view of the data

- [Instructor] We've seen that our data tables are often related together using common attribute fields, and we can pull information out of multiple tables and piece it together again using a join statement. I have one such query saved in the course exercise files that you can access from the course's overview page. Let's go ahead and press the Open File button here on the standard toolbar and I'll navigate out into the Chapter 4 folder where I'll find the Views_Start.sql file. Let's select it and press Open and it opens it up here inside of an editor tab. Now on line number one, I have a comment. Comments in Management Studio are written in a green font and SQL Server uses two hyphen characters to start a commented line. Next, I have a SELECT query that pulls number of columns from three different tables. As you can see, these queries can get quite long, especially if you have several tables joined together. This query pulls…

Contents