From the course: CompTIA Data+ (DA0-002) Cert Prep
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Joining multiple tables
From the course: CompTIA Data+ (DA0-002) Cert Prep
Joining multiple tables
- [Instructor] Joins can involve more than two tables. In fact, joins can and commonly will include three, four, or even more tables. It's not unusual to join together a dozen tables when you're using a complex database schema. Let's say that we want to answer this question. Show me the names, titles, and department names of all current employees in the research and development group. This requires four tables. We begin with a section of the schema that we already know, the Employee table, and the Person table are joined together using business entity ID. I need the Employee table to get titles, and the Person table to get first and last names. I also need the Employee Department History table. This is a linking table that relates employees to the department where they work. This table has a foreign key relationship to the Employee table using business entity ID. And finally, I need department names which are stored in the Department table, and there's a foreign key relationship from…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Structured query language3m 41s
-
SELECT statement2m 27s
-
(Locked)
Sorting results4m 3s
-
(Locked)
Filtering data4m 1s
-
(Locked)
NULL values3m 26s
-
(Locked)
Aggregating data3m 8s
-
(Locked)
Grouping data3m 7s
-
(Locked)
String manipulation2m 43s
-
(Locked)
Working with dates2m 14s
-
(Locked)
Derived values3m 16s
-
(Locked)
Set operations5m 37s
-
(Locked)
Join operations1m 58s
-
(Locked)
Inner joins7m 7s
-
(Locked)
Joining multiple tables6m 34s
-
(Locked)
Outer joins2m 55s
-
(Locked)
Nested queries2m 17s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-