Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post

Full outer join

Full outer join

Full outer join returns all the rows from both tables whether it has been matched or not.The FULL OUTER JOIN keyword combines the result of both LEFT and RIGHT joins. 


Syntax:

SELECT
column_name(s)
FROM Table1 (Left Side Table)
FULL JOIN Table2 (Right Side Table)
ON table1.column_name=table2.column_name
 
or:
 
SELECT column_name(s)
FROM Table1 (Left Side Table)
FULL OUTER JOIN Table2 (Right Side Table)
ON table1.column_name=table2.column_name

 

Example:

SELECT ProductName AS [Product Name]
,UnitPrice AS [Price]
,CategoryName AS [Product Category],ImagePath AS [Image]
 FROM Products P
FULL OUTER JOIN Categories C ON P.CategoryID=C.CategoryID


Full join t-sql query will return result 


 

Invalid entry,please enter valid data.

Loading