Wednesday, August 31, 2016

What is an outer join ?

The Outer join is  a combination of inner join,left join and right join just come all the result with this join combination.                                                                     


Cust  Table                                
Customer Id
Name
Phone  Number
1
Erf
0167
2
Ena
0182
3
Ali
0172
Ord Table 
OrderId
Quantity
CustomerID
123
1
1
321
2
2
222
4
4












Query: 
               
SELECT Cust.Name,Ord.OrderId                    
From Customer
Full Outer  Join Order 
on  Cust.CustomerId = Ord.CustomerId





Result:

Name
OrderId
Erf
123
Ena
321
Null
222
Ali
Null


  

                       
                                                                        



In this query all the table come ,If it is matching or not.








No comments:

Post a Comment