still confused which are inner join and which one are outer. | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 3

still confused which are inner join and which one are outer.

24th Oct 2016, 9:22 AM
Amit
4 Antworten
+ 5
in inner join result is where two table match with each other but in case of outer join, result is all data from left or right table with matching data from right or left table.
28th Oct 2016, 12:08 AM
Raja Kishore Patnaik
Raja Kishore Patnaik - avatar
+ 4
hi, in case of outer join, the values of outer table which matches with the inner table is returned and for the non matching columns Null is returned. consider a table employee. empid deptno 123 1 456 2 consider a table department. deptno deptname 1 HR 3 Finance select emp.empid, dept.deptname from employee as emp -- this is inner table left outer join department as dept -- this is outer table on emp.deptno= dept.deptno result would be empid deptname 123 HR 456 Null this join returns all values of inner table and only matching values of outer table. if no match is found then null is returned. Happy learning!
26th Oct 2016, 4:19 PM
ArchiC
+ 2
if you are aware of set theory then, inner join of set A and B = A intersect B outer join of A and B = A + B - 2(A intersect B)
24th Oct 2016, 11:10 AM
rinkesh golwala
rinkesh golwala - avatar
+ 1
Thanks for reply Rinkesh Bhai. Just one small query again. in case of outer join if I reduces 2(A intersect B) in that case it will exclude those element which are common in both A and B. Is my interpretation correct now? Anyway thanks again for giving clarity nd help.
24th Oct 2016, 11:39 AM
Amit