代码之家  ›  专栏  ›  技术社区  ›  AlxVallejo

Postgres中的左联接[重复]

  •  0
  • AlxVallejo  · 技术社区  · 7 年前

    好的,这个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
    
    1 回复  |  直到 7 年前
        1
  •  1
  •   Jake    7 年前

    你用的是双引号,实际上你应该用单引号。 单引号表示值,双引号表示列和表等。 You can find out more about the difference here.