>I often hear about an inner, outer, left and right joins. What is the difference in the SQL and in the result sets.
>
>I use "FROM table1, table2 WHERE custno = custno" often and realize it only picks rows from the two tables that match. What is this kind of join called?
>
>Thanks
>
>Brenda
A WHERE acts the same as an INNER JOIN. There must be matching records in both tables for this join to return any results.
LEFT OUTER JOIN returns all records from the left table in the JOIN clause. Any records from the left table without a match in the right table will result in NULL values returned for fields in the right table.
RIGHT OUTER JOIN returns all records from the right table in the JOIN clause. Any records from the right table without a match in the left table will result in NULL values returned for fields in the left table.
FULL OUTER JOIN returns all records from both tables in the JOIN clause. Any records from either table without a match will result in NULL values for those fields.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao