All about #sql JOINs
▻https://hackernoon.com/all-about-sql-joins-ced19ecc4c1d?source=rss----3a8144eabfe3---4
Joining tables is the first big learning curve after getting your head around SQL basics.More often than not you won’t find everything you need in one table so will need to learn which #join to use when.If you’re familiar with the VLOOKUP function in Excel, you’ll be just fine.T-SQL supports cross, inner and outer JOIN clauses, and UNION operators to combine datasets. While there are plenty of guides to JOINs that use venn diagrams to get the point across, I prefer something more visual.INNER JOINUse an INNER join, or just a JOIN, when you want to find the match between two tables. You need to have a key on both tables that you join ON, and that’s where the match happens. Any results where there is not a match are discarded.select o.order_item, i.inventory_item from orders o inner join (...)