
Querying Information in Windows Azure SQL Database ◾ 229
SELECT DISTINCT FirstName, LastName, CourseName
FROM STUDENT S, STUDENT_CLASS T, CLASS C, COURSE R
WHERE S.StudentID = T.StudentID AND
T.ClassID = C.ClassID AND
C.CourseID = R.CourseID
Since the tables STUDENT and COURSE are not directly linked, two additional
tables STUDENT_CLASS and CLASS are used to link the table STUDENT to the
table COURSE. Highlight the code and click Run. e result of the query is shown in
Figure 6.56.
8. Example 7: Select the semesters and classes by using a left outer join to see if any of the
semesters offer no class. Enter the following query:
SELECT Semester, ...