The FULL OUTER JOIN will returns all records when found matched records in left side table or right table.
xxxxxxxxxx
SELECT Customers.customer_id, Customers.first_name, Orders.amount
FROM Customers
FULL OUTER JOIN Orders
ON Customers.customer_id = Orders.customer
WHERE Orders.amount >= 500;
xxxxxxxxxx
SELECT Customers.customer_id, Customers.first_name, Orders.amount
FROM Customers
FULL OUTER JOIN Orders
ON Customers.customer_id = Orders.customer
WHERE Orders.amount >= 500;
xxxxxxxxxx
#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
xxxxxxxxxx
SELECT columns
FROM table_A
FULL OUTER JOIN table_B ON table_A.id = table_B.id
xxxxxxxxxx
SELECT columns
FROM table1
FULL OUTER JOIN table2
ON table1.column_name = table2.column_name;
xxxxxxxxxx
#Syntax to execute FULL OUTER JOIN in SQL
FROM table1
FULL OUTER JOIN table2
ON table1.columnName = table2.columnName
WHERE condition;
xxxxxxxxxx
SELECT Customers.customer_id, Customers.first_name, Orders.amount
FROM Customers
FULL OUTER JOIN Orders
ON Customers.customer_id = Orders.customer;
xxxxxxxxxx
FULL OUTER JOIN:
is used when retrieving data from
multiple tables and will return both
table records, matching and non-matching.
xxxxxxxxxx
123SELECT columns FROM table_A FULL OUTER JOIN table_B ON join_conditionsXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX