Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all

I created 8 tables in sql server how use joins these 8 tables, is possible or not please reply me
Posted

Yes, it is possible, but it can become unwieldy complex. Learn more here: inner-join-with-multiple-tables[^]
 
Share this answer
 
It is possible as long as you know which columns from which all tables are related and hence to be matched.

Here is an example query for 3 tables:

SQL
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;


[Please encourage participation by up-voting solutions or answers that work for you]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900