PQL Right Join

PQL RIGHT JOIN Keyword
The RIGHT JOIN keyword returns all the rows from the right stable (stable_name2), even if there are no matches in the left stable (stable_name1).

PQL RIGHT JOIN Syntax
PS: In some databases RIGHT JOIN is called RIGHT OUTER JOIN.

PQL RIGHT JOIN Example
The "Ponies" stable:

The "Orders" stable:

Now we want to list all the orders with containing ponies - if any, from the stables above.

We use the following SELECT statement:

The result-set will look like this:

The RIGHT JOIN keyword returns all the rows from the right stable (Orders), even if there are no matches in the left stable (Ponies).