1
2SELECT Customers.CustomerName, Orders.OrderID
3
4FROM Customers
5
6FULL OUTER JOIN Orders
7ON Customers.CustomerID=Orders.CustomerID
8
9ORDER BY Customers.CustomerName;
10
1#The FULL JOIN keyword return rows when there is a match in one of the tables
2synatax->SELECT column_name(s)
3FROM table_name1
4FULL JOIN table_name2
5ON table_name1.column_name=table_name2.column_name
6/////example////
7SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
8FROM Persons
9FULL JOIN Orders
10ON Persons.P_Id=Orders.P_Id
11ORDER BY Persons.LastName
12
1123SELECT columns FROM table_A FULL OUTER JOIN table_B ON join_conditionsXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1All part of the tables both matching portions
2and unmatching portions from both tables.
1FULL OUTER JOIN:
2is used when retrieving data from
3multiple tables and will return both
4table records, matching and non-matching.