Hi,
Can anyone tell me about Outer join with an example ? Also explain types of Outer join in SQL server.
Outer join in sql server
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Arul Selvan25 reputationPosted Aug 3, 2011, 4:41 AM EDT
1.left outer join
2.right outer join
3.full outer join
In normal join compare two table and display rows which match based on condition
but left outer join display all values from left side table and display matched value only right side table
see below example
employee table
department table
see above tables both have depid
left outer join
select employee.empid,employee.empname,department.depid,department.depname from employee left outer join department on employee.depid=department.depid;
now see the left side all values are displayed and right side table which are not match it display NULL
The right outer join opposite to left outer join
The full join both side it display not matched value as NULL
select employee.empid,employee.empname,department.depid,department.depname from employee full outer join department on employee.depid=department.depid;