2011-04-29 43 views
6

我该如何得到这个查询的工作?Postgresql为什么说“架构不存在”

SELECT weather.id, cities.name, weather.date, weather.degree 
FROM weather JOIN weather.city_id ON cities.id 
WHERE weather.date = '2011-04-30'; 

错误:架构“天气”不存在。

天气不是模式,它是一张桌子!

回答

8

也许是:

SELECT weather.id, cities.name, weather.date, weather.degree 
FROM weather JOIN cities ON (weather.city_id = cities.id) 
WHERE weather.date = '2011-04-30'; 

Postgres的抱怨联接上weather.city_id这被解释为在模式“天气”

称为“city_id”表/图
相关问题