controling the logical process phrase of join

 

select distinct c.companyname as customer,s.companyname as supplier
from sales.customers as c
left outer join
(
sales.orders as o
join
sales.orderdetails as od
on
o.orderid=od.orderid
join
production.products as p
on
p.productid=od.productid
join
production.suppliers as s
on
s.supplierid=p.supplierid
)
on o.custid=c.custid

你可能感兴趣的:(C++,c,C#)