Outer Joins: A Demonstration

Now that you know when to use an outer join in a query, Professor Ramanathan will take you through some example queries using left and right joins. Using a left join will return all values from the left table and matching values from the right table. If there is no match for any value, the right table will return null for that value.

To summarise, an outer join is used when you want to display the rows in one table even if they do not have a corresponding entry in the other table. Also, an outer join is of two types: left outer join and right outer join. It does not really matter which table you treat as left or right, i.e., you can choose the table that you are more comfortable with.

In the next segment, you will learn the application of views along with joins.

Report an error