LEFT OUTER JOIN
In case we want to show all records of left table irrespective of matching results from second table, we use left outer join
e.g: this query will give all records of left table whether any record matches with second table or not
SELECT A1.pname STORE
FROM table1 A1
LEFT OUTER JOIN table2 A2
ON A1.pname = A2.pname
GROUP BY A1.pname;
No comments:
Post a Comment