顺便说一下,您已经在其中定义了一个内部联接。
通过在右手表上有一个子句,它必须满足两个条件。
SELECt p.Name, a.AttributeFROM People pLEFT OUTER JOIN Attributes aON p.PersonID = a.PersonID WHERe a.Attribute IN ('Happy','Grouchy') -- This means that the right side must exist alsoAND p.person_id IN ('Elmo', 'Oscar')使用INNER JOIN或将此WHERe作为AND移至ON子句



