PostgreSQL: Using AND statement in LEFT JOIN is not working as expected
问题 This query returns all the elements in the table la and all nulls for fields coming from the lar table which is not what I expected. SELECT la.listing_id, la.id, lar.* FROM la LEFT JOIN lar ON lar.application_id = la.id AND la.listing_id = 2780; This query returns correct and expected results but shouldn't both queries do the same thing ? SELECT la.listing_id, la.id, lar.* FROM la LEFT JOIN lar ON lar.application_id = la.id WHERE la.listing_id = 2780; What am I missing here? I want to make