Skip to content

Instantly share code, notes, and snippets.

@dclarke-modus
Created December 12, 2017 11:46
Show Gist options
  • Save dclarke-modus/df4f6dbb5b0c99158186da5b8a05ee84 to your computer and use it in GitHub Desktop.
Save dclarke-modus/df4f6dbb5b0c99158186da5b8a05ee84 to your computer and use it in GitHub Desktop.
Table Students Table Class
id, name, class_id id, name
1, Dean, 1 1, Math
3, Shahib, 2 2, English
4, Chris, null 3, Science
@dclarke-modus
Copy link
Author

dclarke-modus commented Dec 12, 2017

What would be outputted:

select s.name from Students s left join Class c on s.class_id = c.id

@dclarke-modus
Copy link
Author

select s.name from Students s inner join Class c on s.class_id = c.id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment