为什么Postgresql说“架构不存在”

时间:2011-04-29 08:36:57

标签: 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';

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

天气不是架构,它是一张桌子!

1 个答案:

答案 0 :(得分:10)

也许:

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'的表/视图

相关问题