Italian Trulli

Right Outer Joins in SQL With Example

Test Tribe
.

Right Joins in SQL - Right Outer Joins in SQL with Example 

In SQL, right joins are performed using the RIGHT JOIN or RIGHT OUTER JOIN keywords, depending on the database system you are using. The right join retrieves all records from the right (second) table and the matching records from the left (first) table.

 
Syntax of Right Out Joins 
The basic syntax of right join is given below.
SELECT columns
FROM table1
RIGHT JOIN table2 ON join_condition;

SELECT columns
FROM table1
RIGHT OUTER JOIN table2 ON join_condition;

Example of Right Outer Joins 
An example of right joins is given below.
SELECT Customers.ID, Customers.Name, Orders.Product
FROM Customers
RIGHT JOIN Orders ON Customers.ID = Orders.ID;

Hope!!! The above Tutorial on Right Outer joins with an example is helpful for you...

Team,
QA acharya

Right Outer Joins in SQL With Example

Post a Comment

0 Comments