首页 > 解决方案 > 在 Postgres 中左加入

问题描述

好的,这个 SQL 查询有什么问题:

select j.* from judge as j 
left join user as u on j.user_id = u.id 
where u.email="john@example.com";
ERROR:  column "john@example.com" does not exist

标签: postgresqlleft-join

解决方案


您在实际应该使用单引号的地方使用双引号。单引号表示值,而双引号表示列和表等。 您可以在此处找到有关差异的更多信息。


推荐阅读