select distinct *
from Customers c
inner join Orders o on c.CustomerID=o.CustomerID
where Country='Mexico'
select distinct CompanyName, ContactName,Country,City
from Customers c
inner join Orders o on c.CustomerID=o.CustomerID
where Country='Mexico'
结果不同。谁能给我解释下join原理
from Customers c
inner join Orders o on c.CustomerID=o.CustomerID
where Country='Mexico'
select distinct CompanyName, ContactName,Country,City
from Customers c
inner join Orders o on c.CustomerID=o.CustomerID
where Country='Mexico'
结果不同。谁能给我解释下join原理
1 2 3
2 2 3distinct之后.不会发生任何变化
2 3
2 3distinct之后变成一条记录.
组合两个表中的记录