Copyright © Kathi Kellenberger, 2014. Unauthorized use and/or duplication of this material without express and written permission from Kathi Kellenberger is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Kathi Kellenberger and auntkathisql.com with specific direction to the original content.
I am working through “Beginning T-SQL 2012”, exercise 5-2-6 is “Write a query that returns the BusinessEntityID column from the Sales.SalesPerson table along with every ProductID from the Production.Product table”. The supplied answer uses a cross join, how would I know that a cross join is needed here?
The key word here is “every”. If I want to join from one table to every row in another table, that is a clue to use cross join.