PQL Left Join

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

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

PQL LEFT JOIN Example
The "Ponies" stable:

The "Orders" stable:

Now we want to list all the ponies and their orders - if any, from the tables above.

We use the following SELECT statement:

The result-set will look like this:

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