Summary

In today's lesson, you learned how to join one or more tables together to produce useful collections of data for use by your application programs. You saw how to use the different types of joins depending on your needs. Inner joins can be used to gather information from multiple tables or from one table by restricting the number of rows that appear in a result set using the information contained in another table.

Understanding these different types of joins helps you to understand the concepts of T-SQL. You will need this understanding before going on to tomorrow's lesson on sub-queries. Finally, I want to leave you with a few do's and don'ts pertaining to using joins:

DoDon't
Be careful when using multipart keysInclude tables in a join ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.