0
的代碼如下:MySQL錯誤1066不是唯一的表/別名
Select Branch.BranchName, Sum(Inventory.OnHand) From Inventory, Branch
Inventory.BranchNum = Branch.BranchNum
Group By BranchName;
我得到一個「不是唯一表」庫存和我不明白爲什麼。另外,爲什麼庫存和分支?
的代碼如下:MySQL錯誤1066不是唯一的表/別名
Select Branch.BranchName, Sum(Inventory.OnHand) From Inventory, Branch
Inventory.BranchNum = Branch.BranchNum
Group By BranchName;
我得到一個「不是唯一表」庫存和我不明白爲什麼。另外,爲什麼庫存和分支?
添加WHERE
條款:
Select Branch.BranchName, Sum(Inventory.OnHand)
From Inventory, Branch
WHERE Inventory.BranchNum = Branch.BranchNum
Group By BranchName;
隱連接是壞的。 –