SELECT COUNT(companyId)
FROM Companies
LEFT JOIN Cities ON Cities.cityId = Companies.cityId
GROUP BY Companies.companyId;
VS
SELECT COUNT(companyId)
FROM Cities
LEFT JOIN Companies ON Cities.cityId = Companies.cityId
GROUP BY Companies.companyId;
的區別是什麼?這兩個MySQL查詢有什麼區別?
你跑過了嗎? –
查看左連接中的左端是什麼意思,你就會得到你的答案。 – ceejayoz
做作業? – Kawu