Oracle OUTER JOINAn outer join is similar to equijoin but it gets also the non-matched rows from the table. It is categorized in Left Outer Join, Right Outer Join and Full Outer Join by Oracle 9i ANSI/ISO 1999 standard. Left Outer JoinLeft Outer Join returns all rows from the left (first) table specified in the ON condition and only those rows from the right (second) table where the join condition is met. Syntax Image representation of left outer join Example In this example, we are performing left outer join on the already created tables ?suppliers? and ?order1?. The following example would return all records from table ?suppliers? and only those records from table ?order1? where the join fields are equal. Execute this query Output Right Outer JoinThe Right Outer Join returns all rows from the right-hand table specified in the ON condition and only those rows from the other table where the join condition is met. Syntax Image representation of Right Outer Join Example In this example, we are performing right outer join on the already created tables ?suppliers? and ?order1?. The following example would return all rows from the order1 table and only those rows from the suppliers table where the join condition is met. Execute this query Output Full Outer JoinThe Full Outer Join returns all rows from the left hand table and right hand table. It places NULL where the join condition is not met. Syntax Image representation of Full Outer Join Example In this example, we are performing full outer join on the already created tables ?suppliers? and ?order1?. The following example will return all rows from the ?suppliers? table and all rows from the ?order1? table and whenever the join condition is not met, it places the NULL value. Execute this query Output Next TopicOracle EQUI JOIN |