ここからpostgresのnorthwindポートを使用します: http ://code.google.com/p/northwindextended/downloads/detail?name = northwind.postgre.sql
このクエリをデータベースで実行できません:
SELECT TRIM(t.TerritoryDescription) AS TerritoryDescription
FROM Territories t
INNER JOIN EmployeeTerritories et ON t.TerritoryID = et.TerritoryID
INNER JOIN Employees e ON et.EmployeeID = e.EmployeeID
WHERE e.EmployeeID = 1
エラーは次のとおりです。
エラー:列t.territoryidが存在しません 3行目:内部結合EmployeeTerritories et ON t.Territory
しかし、テーブルterritories
とterritoryid
列は両方ともそこにあります。