Join

Description

Combines the rows from two table references based on join criteria. (Databricks SQL Language Reference JOIN)

A JOIN operation combines rows from two tables (or other table-like sources, such as views or table functions) to create a new combined row that can be used in the query. For a conceptual explanation of joins, see Working with Joins. (Snowflake SQL Language Reference JOIN)

Syntax

left_table_reference { [ join_type ] JOIN right_table_reference join_criteria |
           NATURAL join_type JOIN right_table_reference |
           CROSS JOIN right_table_reference }

join_type
  { [ INNER ] |
    LEFT [ OUTER ] |
    [ LEFT ] SEMI |
    RIGHT [ OUTER ] |
    FULL [ OUTER ] |
    [ LEFT ] ANTI |
    CROSS }

join_criteria
  { ON boolean_expression |
    USING ( column_name [, ...] ) }

Sample Source Patterns

Setup data

Databricks

Snowflake

Pattern code

Databricks

Snowflake

Known Issues

No issues were found

No related EWIs

Last updated

Was this helpful?