From the course: Microsoft SQL Server 2019 Essential Training
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Join related tables - SQL Server Tutorial
From the course: Microsoft SQL Server 2019 Essential Training
Join related tables
- [Instructor] No discussion about SQL SELECT statements would be complete without talking about how to view information from across multiple tables. This involves adding a JOIN to our FROM clause in the SQL SELECT query. I'd like to review the data that we have in the Landon Hotel by starting up a new query here and make sure that we've selected the LandonHotel in the dropdown menu there. Now I can run three different SELECT statements all at once to review the data that's in the Guest table, the Room Reservations table and the Rooms table. When I execute this query, I really get three different results windows down below. Now if you're not seeing all three of them, you can click here, right below the scroll bar. You'll get this double-headed arrow and you can click and drag it up on your screen so you can see all three. These results windows will be in the same order that we selected them up here in the query. So I…
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)
Understand the role of T-SQL1m 59s
-
(Locked)
Use the T-SQL editor6m 4s
-
(Locked)
Create a table with T-SQL5m 28s
-
(Locked)
Solution: Create tables with T-SQL commands3m 48s
-
(Locked)
Add data to a table3m 41s
-
(Locked)
Solution: Add data with T-SQL commands3m 3s
-
(Locked)
Retrieve records with SELECT3m 28s
-
(Locked)
Solution: Query data in a database2m 3s
-
(Locked)
Filter returned results with WHERE1m 51s
-
(Locked)
Sort records2m 42s
-
(Locked)
Solution: Filter and sort data with a query4m 22s
-
(Locked)
Delete records from a table3m 32s
-
(Locked)
Update records in a table3m 4s
-
(Locked)
Solution: Remove and update records in a table6m 22s
-
(Locked)
Join related tables5m 1s
-
(Locked)
LEFT JOIN and RIGHT JOIN2m 16s
-
(Locked)
Solution: Query information from related tables5m 43s
-
(Locked)
Remove a table from the database4m 6s
-
(Locked)
-
-
-
-
-
-