Created
January 27, 2016 08:43
-
-
Save dnasca/96f600c4da4f8a0b3446 to your computer and use it in GitHub Desktop.
Inner Joins - take 2 data sources and return all matching pairs of rows based on the join condition. unmatched rows are discarded
This file contains hidden or 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
| --ansi sql-92 standard syntax (filter rows in the ON clause) | |
| SELECT | |
| p.Name, | |
| od.ProductId, | |
| od.SalesOrderDetailId, | |
| od.OrderQty | |
| FROM | |
| Production.Product AS p | |
| INNER JOIN Sales.SalesOrderDetail AS od | |
| ON p.ProductId = od.ProductId | |
| ORDER BY | |
| p.Name, od.SalesOrderDetailId; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment