Created
September 11, 2017 06:25
-
-
Save rts-rob/c38a71d96a9650415f1592e99953e0dd to your computer and use it in GitHub Desktop.
Example of an INNER JOIN across three tables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE VIEW ClassesAndRunningInformation AS | |
SELECT | |
ClassGroup.Name AS ClassGroupName, | |
Running.StartDate, | |
Module.Name AS ModuleName, | |
Module.Length AS ModuleLength | |
FROM | |
ClassGroup | |
INNER JOIN | |
Running | |
ON ClassGroup.Id = Running.ClassGroup_Id | |
LEFT JOIN | |
Module | |
ON Running.Module_Id = Module.Id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment