Skip to content

Instantly share code, notes, and snippets.

@kironroy kironroy/sql.txt
Created Dec 17, 2019

Embed
What would you like to do?
SQL notes
-- inner join: only the records that match
-- left join: all the records from the left table, and all the matching records from the right table
-- right join: all the records from the right table, and all the matching records from the left table
select c.CompanyName, l.City
from dbo.Customers c
left join dbo.Locations l on c.id = l.CustomerId
select *
from dbo.customers
select *
from dbo.Locations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.