SQL full join code example

Example 1: full join sql

#The FULL JOIN keyword return rows when there is a match in one of the tables
synatax->SELECT column_name(s)
FROM table_name1
FULL JOIN table_name2
ON table_name1.column_name=table_name2.column_name 
/////example////
SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
FULL JOIN Orders
ON Persons.P_Id=Orders.P_Id
ORDER BY Persons.LastName

Example 2: full outer join in sql

FULL OUTER JOIN:
is used when retrieving data from
multiple tables and will return both
table records, matching and non-matching.

Tags:

Sql Example