In this video, learn how to join related tables. Relational databases rely on the data stored in primary and foreign key fields to help the system find records that expand on and relate to other information. With these connective threads in place, an SQL SELECT query can use table joins to return information from across multiple 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 have the Guests table up here at the top, …
Author
Released
5/17/2019- Installing Management Studio
- Enabling features with SQL Server Configuration Monitor
- Creating a database
- Creating tables with Transact-SQL (T-SQL)
- Creating relationships between tables
- Creating views
- Creating user-defined scalar functions
- Backing up and restoring SQL Server
- Monitoring and management
- Security
Skill Level Beginner
Duration
Views
Related Courses
-
Learning Microsoft SQL Server 2019
with Adam Wilbert1h 19m Beginner -
Database Foundations: Administration
with Adam Wilbert1h 14m Beginner -
Database Foundations: Core Concepts
with Adam Wilbert2h 14m Beginner
-
Introduction
-
1. Get Started
-
Core concepts5m 4s
-
Install Management Studio3m 30s
-
-
2. Log into the Server
-
Create a new user account4m 23s
-
3. Create Databases
-
Create the first database5m 45s
-
Table structures3m 1s
-
Create a simple table6m 32s
-
Edit a table's structure1m 58s
-
Import data from CSV files5m 41s
-
Install a sample database2m 56s
-
-
4. Table Design for Healthy Databases
-
Understand data types6m 46s
-
Table column properties4m 7s
-
Primary key fields3m 46s
-
Check constraints4m 7s
-
Unique constraints5m 39s
-
Foreign keys3m 59s
-
Create a foreign key column3m 30s
-
-
5. Structured Query Language
-
Understand the role of T-SQL1m 59s
-
Use the T-SQL editor6m 4s
-
Create a table with T-SQL5m 28s
-
Add data to a table3m 41s
-
Retrieve records with SELECT3m 28s
-
Sort records2m 42s
-
Delete records from a table3m 32s
-
Join related tables5m 1s
-
LEFT JOIN and RIGHT JOIN2m 16s
-
-
6. Query Performance
-
Create a view of the data7m 37s
-
Data table indexes2m 50s
-
Columnstore indexes2m 22s
-
View execution plans3m 8s
-
SQL Server's Query Store3m 16s
-
Rebuild indexes3m 56s
-
-
7. Query Programmability
-
Aggregate functions6m 39s
-
Use built-in functions3m 20s
-
Create stored procedures3m 54s
-
-
8. Backup and Restore
-
Create a differential backup2m 34s
-
Restore a backup3m 28s
-
Automate backups3m 53s
-
9. Security
-
User roles and permissions4m 38s
-
Database schemas6m 26s
-
Dynamic data masking3m 51s
-
Always On data encryption5m 26s
-
-
10. Monitoring and Management
-
Dynamic management views2m 13s
-
Conclusion
-
Next steps50s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Join related tables