What's the difference between left outer and right outer join...answer hurry up guys | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What's the difference between left outer and right outer join...answer hurry up guys

18th Dec 2017, 8:06 AM
Eqbal Behroz
Eqbal Behroz - avatar
3 Answers
+ 4
LEFT OUTER JOIN returns all the matching records from the left-hand table REGARDLESS whether or not there are matching records in the right-hand table. This allows NULL value to be used in place of the selected field from the right-hand table when there is no data in right-hand table found to match the data from left-hand table. RIGHT OUTER JOIN returns all the matching records from the right-hand table REGARDLESS whether or not there are matching records in the left-hand table. This allows NULL value to be used in place of the selected field from the left-hand table when there is no data in left-hand table found to match the data from right-hand table. INNER JOIN strictly filters out the broken links, and return ONLY the fields from the joined tables that have a valid matching pair. You would not, generally, see a NULL value upon using INNER JOIN, because all that is returned are well connected (related) sets of fields. Hth, cmiiw
18th Dec 2017, 8:50 AM
Ipang
+ 1
LEFT OUTER JOIN would be "show me all students, with their corresponding locker if they have one". This might be a general student list, or could be used to identify students with no locker. Returns 100 rows RIGHT OUTER JOIN would be "show me all lockers, and the students assigned to them if there are any". This could be used to identify lockers that have no students assigned, or lockers that have too many students. Returns 80 rows (list of 70 students in the 40 lockers, plus the 10 lockers with no student)
18th Dec 2017, 8:14 AM
Humayun Mukhtar
Humayun Mukhtar - avatar
+ 1
LEFT JOIN performs a join starting with the first (left-most) table and then any matching second (right-most) table records. LEFT JOIN and LEFT OUTER JOIN are the same. RIGHT JOIN performs a join starting with the second (right-most) table and then any matching first (left-most) table records. RIGHT JOIN and RIGHT OUTER JOIN are the same
19th Dec 2017, 5:08 AM
JAGADISH K N
JAGADISH K N - avatar