‎2007 Jul 15 2:21 PM
‎2007 Jul 16 1:38 PM
example there are two tables TABLE1 and TABLE2
The INNER JOIN returns all rows from both tables where there is a match. If there are rows in TABLE1 that do not have matches in TABLE2, those rows will not be listed.
<b>LEFT JOIN</b>
The LEFT JOIN returns all the rows from the first table (TABLE1), even if there are no matches in the second table (TABLE2).
<b>OUTER JOIN</b>
The RIGHT JOIN returns all the rows from the second table (TABLE2), even if there are no matches in the first table (TABLE1).
REWARD IF USEFUL....
CHEERS,
K.SUNIL KUMAR
‎2007 Jul 16 1:39 PM
Hi,
Resulting set for inner join
The inner join joins the columns of every selected line on the left- hand side with the columns of all lines on the right-hand side that jointly fulfil the join_cond condition. A line in the resulting set is created for every such line on the right-hand side. The content of the column on the left-hand side may be duplicated in this case. If none of the lines on the right-hand side fulfils the join_cond condition, no line is created in the resulting set.
Resulting set for outer join
The outer join basically creates the same resulting set as the inner join, with the difference that at least one line is created in the resulting set for every selected line on the left-hand side, even if no line on the right-hand side fulfils the join_cond condition. The columns on the right-hand side that do not fulfil the join_cond condition are filled with null values.
Regards,
Sesh
‎2007 Jul 16 1:47 PM
HI,
INNER JOIN - WHEN USED BETWEEN 2 TABLES ALL COMMON FIELDS IN BOTH TABLES CAN BE SELECTED.
OUTER JOIN - WHEN USED B/W TWO TABLES ALL COMMON FIELDS OF BOTH TABLES AND REMAINING FIELDS OF 1ST TABLE CAN BE SELECTED.
LEFT OUTER JOIN - SAME AS OUTER JOIN.
RIGHT OUTER JOIN - WHEN USED B/W TWO TABLES ALL COMMON FIELDS OF BOTH TABLES AND REMAINING FIELDS OF 2ST TABLE CAN BE SELECTED.
IF HELPFUL REWARD SOME POINTS,
WITH REGARDS,
SURESH.A