Joins
Introduction
Starcounter supports inner joins, cross joins, left outer joins and right outer joins.
The default join type is inner join, so if you use the reserved word JOIN
, the parser will interpret it as an inner join.
Cross Join
A cross join is an inner join without join condition, and thus can be regarded as a special case rather than a separate type of join.
This query is interpreted as a cross join:
It can also be written as an explicit cross join:
Inner Join
This query is interpreted as an inner join:
It can also be written as an explicit inner join:
Outer Joins
For left outer join and right outer join you may omit the reserved word OUTER
.
This query returns all employees and their managers, including the employees that have no manager:
This left outer join can also be written as a right outer join:
Last updated