SQL Right Join

RIGHT JOIN is similar to LEFT JOIN. This join returns all the rows of the table on the right side of the join and matching rows for the table on the left side of the join. For the rows for which there is no matching row on the left side, the result-set will contain null. RIGHT JOIN is also known as RIGHT OUTER JOIN. 

Syntax: 

SELECT table1.column1,table1.column2,table2.column1,....

FROM table1 

RIGHT JOIN table2

ON table1.matching_column = table2.matching_column;

Note:

table1: First table.

table2: Second table

matching_column: Column common to both the tables.

Post a Comment

0 Comments