Which code segment should you use?

You have two tables named SalesPerson and SalesTerritory.
You need to create sample data by using a Cartesian product that contains the data from the
SalesPerson
and SalesTerritory tables.
Which code segment should you use?

You have two tables named SalesPerson and SalesTerritory.
You need to create sample data by using a Cartesian product that contains the data from the
SalesPerson
and SalesTerritory tables.
Which code segment should you use?

A.
SELECT p.SalesPersonId,
t.Name AS [Territory]
FROM Sales.SalesPerson p
FULL JOIN Sales.SalesTerritory t
ON p.TerritoryId = t.TerritoryId

B.
SELECT p.SalesPersonId,
t.Name AS [Territory]
FROM Sales.SalesPerson p
INNER JOIN Sales.SalesTerritory t
ON p.TerritoryId = t.TerritoryId

C.
SELECT p.SalesPersonId,
t.Name AS [Territory]
FROM Sales.SalesPerson p
CROSS JOIN Sales.SalesTerritory t
WHERE p.TerritoryId = t.TerritoryId

D.
SELECT p.SalesPersonId,
t.Name AS [Territory]
FROM Sales.SalesPerson p
CROSS JOIN Sales.SalesTerritory t



Leave a Reply 0

Your email address will not be published. Required fields are marked *