Friday, August 19, 2011

Joining Three or More Tables


Example query :
SELECT p.Name, v.Name
FROM Production.Product p
JOIN Purchasing.ProductVendor pv
ON p.ProductID = pv.ProductID
JOIN Purchasing.Vendor v
ON pv.BusinessEntityID = v.BusinessEntityID
WHERE ProductSubcategoryID = 15
ORDER BY v.Name;

No comments:

Post a Comment

Devops links

  Build Versioning in Azure DevOps Pipelines