Oreilly - Selecting Data from Multiple Tables
by John Deardurff | Released April 2019 | ISBN: 9781484249055
Extend your SELECT statements to retrieve data simultaneously from multiple tables in a SQL Server database. This video covers these joins and shows how they are fundamental to getting maximum value from any relational database engine. It is impossible to write professional-level queries without a solid grounding in joins. Selecting Data from Multiple Tables helps you to attain that level of expertise. You will start with an introduction to relationships and joins with a look at the differences between a parent and child table. You'll learn how to define rows in two tables to correspond to each other through a common value column, or through a set of such columns held in common in both tables. The examples show that such relationships can record and store a wide variety of master-detail data points such as, for example, the line items in a customer order. Segments in the video examine the major different join types, including inner joins, left and right outer joins, and full outer joins. You'll also work with self joins and cross joins. Finally, the video goes through various union operations that you can also use to combine rows from two or more tables, but in a manner different from a join. Union operations covered in this video include the basic union, and intersection and exception operations. What You Will LearnIdentify parent key and foreign keys to establish table relationshipsReturn parent rows even in the absence of corresponding child rowsCorrectly choose between LEFT, RIGHT, and FULL outer joinsQuery for rows that are held in common between two tablesCombine rows from multiple result sets using union operationsWho This Video Is For Business analysts, developers, and others whose career will benefit from knowledge of the SQL language for accessing Microsoft SQL Server databases and the data they contain. Show and hide more
- Introduction 00:02:50
- SELECT from Multiple Tables 00:05:12
- Finding Table Relationships 00:07:20
- Parent Tables vs Child Tables 00:02:48
- Using Inner Joins 00:04:58
- Using Left Outer Joins 00:02:30
- Using Right Outer Joins 00:02:59
- Using Full Outer Joins 00:03:04
- Using Self Joins 00:04:16
- Using Cross Joins 00:03:06
- UNION and UNION All Operators 00:02:52
- INTERSECT and EXCEPT Operators 00:02:43
Show and hide more