 So, students in this module, we will look at a different type of join. We have looked before at equi-join in which those rows are returned from the join tables which are matching, which have the matching field. But in the left and right join, those rows are also returned for which there is no match. There are many applications of this type of join. Left-right joins. Now, remember that the right join is just the side of the query is reversed. So, whatever we discussed in the left join is applicable to the right join when the side of the query is reversed. You will understand this when you look at the nodes. Let's briefly look at the module outline. What is the working and purpose of the left join? What are the important points and two column combinations? You will understand I will give you the example also and this example is based upon a scenario which I will also briefly discuss in this module. So, let's look at the working and purpose of the left join. The right join works like this. You specify the columns to be used for matching rows in the two tables. Okay, which two tables? These tables which we have already been discussing. When a row from the left table matches a row from the right table, the contents of the rows are selected as an output row. When a row in the left table has no match, it is selected for output but joined with a fake row from the right table in which all the columns have been set to null. In other words, a left join forces the result set to contain row for every row in the left table. Okay, and what do we get to say, for example, over here, I have this equi-join, right? But when I do a left join over here, I get these values because these are not the matching values. A left join produces output for every row in T1, whether or not T2 matches it. To write a left join, name the tables with left join in between rather than a comma. No comma over here. Okay, and specify the matching condition using an on clause rather than the where clause. On where? They're different. Now there's an output row even for the value one, which has no match in T2. Left join is especially useful when you want to find only those left table rows that are unmatched by the right table. So let's look at some important points. And in those important points, we look at on and the using clause. Left join actually allows the matching conditions to be specified two ways. On is one of these. It can be used whether or not the columns you are joining on have the same name. Alright, this is the example over here. Okay, the other syntax involves a using parenthesis clause over here. This is similar to the concept to on, but the name of the joint column or columns must be the same in each table. For example, the following query joins my tab 1.b to my tab 2 over here. Like this. Okay, left join has a new or a few synonyms and variants. Left outer join is a synonym for left join. There is also an ODBC style notation for left join that my SQL accepts the OJ, which means the outer join. This needs to be understood carefully. One thing to watch out for the left join is that if the column that you are joining or the columns are not declared as null, you may get problematic rows in the result. For example, if the right table contains columns with null values, you won't be able to distinguish those nulls from the null values that identify unmet rows. So you have two types of nulls, which I have discussed right now. So finally, let's look at what we are going into. So this is the scenario over here. This is the example grade book initial score over here and the score table. So whether the problem over here is that there were events were taking. Okay. And the student got sick. And now we have to find out when the student was sick and because there is no entry for the student sick. So how do we go about it? So we look at the two column combinations. So student was ill on the day of the event. So how to identify for the makeup exam. So note that the on clause allows the rows in the score table to be joined according to matches in different tables. That's the key for solving this problem. The left joint forces a row to be generated for each row produced by the cross join of the student and event tables. Even when there is no corresponding score table record, the result set rows for these missing score records can be identified by the fact that the columns from the score table will all be null. We can select these records in the where clause. Okay. Any column from the score table will do. But because we are looking for missing, it's better to conceptually clear the test to the score column. Okay. So we use this code which helps us. Okay. And with the where and the order clause, we are looking at these combinations and it should be clear for the sake of clarity. All right. And finally to conclude this, now the details of this problem are given the text. I'm not going to the details what the problem is. You can read the details and then you can look at this code over here. And finally for these two column combinations is a subtle point. The output displays the student IDs and the event IDs. The student underscore ID column appears in both the student and score tables. Okay. In both the student and the over here, over here and over here. This is I am talking about. So at first you might think that the selection list would name either student dot student underscore ID or score dot student underscore ID. That's not the case because the entire basis for being able to find the records where we are interested in is that all the score table is returned as null. Selecting score dot student underscore ID would produce only a column of null values in the output which we are not looking for the same principle applies to deciding whether event underscore ID column to display. It appears in both the event and score tables but the query selects event dot event underscore ID because the score dot event underscore ID values will always be null and we are not we are not looking for the nulls. Now you need to read this and convince yourself. How do you convince yourself by running the code and run it two or three times? Read the nodes and everything will fall together in place. Thank you for your time.