为什么Postgresql说"schema does not exist"



我怎么能得到这个查询工作?

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

错误:模式"weather"不存在。

weather不是schema,它是一个表!

也许:

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上的连接,该连接被解释为模式'weather'中名为'city_id'的表/视图

最新更新