Home > DeveloperSection > Forums > HOW TO USE SQL FULL OUTER JOIN
Ankit Singh

Total Post:341

Points:2389
Posted on    December-19-2015 3:59 AM

 Database SQL Server  SQL  SQL Server 2008  SQL Server 2012 
Ratings:


 1 Reply(s)
 299  View(s)
Rate this:
I Want to use Sql full outer join .please help me.


aditya kumar Patel

Total Post:247

Points:1759
Posted on    December-19-2015 4:13 AM

The FULL OUTER JOIN keyword returns all rows from the left table (Customer) and from the right table ([Order]).
The FULL OUTER JOIN keyword combines the result of both LEFT and RIGHT joins.

SELECT column_name(s)
FROM tbl1
FULL OUTER JOIN tbl2
ON tbl1.column_name=tbl2.column_name;

Example

SELECT Customer.CustomerID,Customer.CustomerName, [Order].OrderID,[Order].amount

FROM Customer

FULL OUTER JOIN [Order]

ON Customer.CustomerID=[Order].CustomerID

ORDER BY Customer.CustomerName;

 


Don't want to miss updates? Please click the below button!

Follow MindStick