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 - SQL Server Tutorial
From the course: Learning Microsoft SQL Server 2022
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Create a SELECT statement6m 15s
-
(Locked)
Use functions to calculate values7m 16s
-
(Locked)
Join data from multiple tables4m 54s
-
(Locked)
Write an UPDATE statement4m 37s
-
(Locked)
Add data with an INSERT statement4m 51s
-
(Locked)
Create a view of the data7m 42s
-
(Locked)
Solution: Select data from a table2m 47s
-
(Locked)
Solution: Join related tables with a query3m 11s
-
(Locked)
Solution: Use functions to calculate values4m 49s
-
(Locked)
Solution: Update the data stored in a table6m 30s
-
(Locked)
-