Joins two data sources in a query using outer or inner join syntax.
FROM { stream [ [AS] alias] | stream [ [AS] alias] keep_clause | window_name [ [AS] alias] | nested_join } [ RIGHT | LEFT | FULL ] JOIN { stream [ [AS] alias] | stream [ [AS] alias] keep_clause | window_name [ [AS] alias] | nested_join } nested_join
stream | The name of a data stream |
alias | An alias for the stream or window |
keep_clause | The policy that specifies how rows are maintained in the window |
window_name | The name of a window |
nested_join | A nested join — see below |
FROM { stream [ [AS] alias] | stream [ [AS] alias] keep_clause | window_name [ [AS] alias] | nested_join } [ RIGHT | LEFT | FULL ] JOIN { stream [ [AS] alias] | stream [ [AS] alias] keep_clause | window_name [ [AS] alias] | nested_join } [ on_clause ]
stream | The name of a data stream |
alias | An alias for the stream or window |
keep_clause | The policy that specifies how rows are maintained in the window |
window_name | The name of a window |
nested_join | A nested join. See Joins for more information |
on_clause | The join condition |
For outer joins, use an ON clause to specify the join condition. This is optional for inner joins.
JOIN | All possible combinations of rows from the intersection of both data sources (limited by the selection condition, if one is specified) are published. |
RIGHT JOIN | All possible combinations of rows from the intersection of both data sources (limited by the selection condition, if one is specified) are published. All the other rows from the right data source are also published. Unmatched columns in the left data source publish a value of NULL . |
LEFT JOIN | All possible combinations of rows from the intersection of both data sources (limited by the selection condition, if one is specified) are published. All the other rows from the left data source are also published. Unmatched columns in the right data source publish a value of NULL. |
FULL JOIN | All possible combinations of rows from the intersection of both data sources (limited by the selection condition, if one is specified) are published. All other rows from both data sources are published as well. Unmatched columns in either data source publish a value of NULL . |
The data sources used with this syntax can include data stream expressions, named and unnamed window expressions, and queries. You can use aliases for datasources in this variation of the FROM clause.
The join variation of the FROM clause (ANSI syntax) is limited to two datasources. Accommodate additional datasources using a nested join as one of the datasources. If a nested join is used, it can optionally be enclosed in parentheses, and can include its own ON clause. The rules for the use of the ON clause with a nested join are the same as the rules that govern the use of the ON clause in the join containing the nested join.