From the course: Learning Microsoft SQL Server 2022
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Join data from multiple tables - SQL Server Tutorial
From the course: Learning Microsoft SQL Server 2022
Join data from multiple tables
- [Instructor] Relational databases are able to efficiently store data because they separate information into multiple tables. This reduces redundancy and increases reliability because conflicting information cannot be stored in a properly designed database. To see what I mean, let's take a quick look at the Warehouse.StockItems table from the Wide World Importers database. I'm going to scroll down here and find it there. Let's go ahead and expand it and open up the columns. Here we can see that there are lots of different columns inside of this table. Let's write a new select query that takes a look at a couple of specific columns. I'll grab the StockItemID, StockItemName and SupplierID columns from the table Warehouse.StockItems. Let me execute the statement and we can see the results. Here we see one row for every product that Wide World Importer sells. The Supplier ID tells us who manufactures each item but it doesn't…
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)
-