JOIN Queries
The add-in supports the complete join syntax in Google Spanner. Google Spanner supports inner joins, outer joins, and cross joins. The default is inner. Multiple join operations are supported.
SELECT field_1 [..., field_n] FROM table_1 [[AS] alias_1] [[INNER|[FULL|RIGHT|LEFT] OUTER|CROSS] JOIN [EACH] table_2 [[AS] alias_2] [ON join_condition_1 [... AND join_condition_n]] ]+
Note that the default join is an inner join. The following limitations exist on joins in Google Spanner:
- Cross joins must not contain an ON clause.
- Normal joins require that the right-side table must contain less than 8 MB of compressed data. If you are working with tables larger than 8 MB, use the EACH modifier. Note that EACH cannot be used in cross joins.