HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Is there such a thing as a LEFT CROSS JOIN?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
suchleftcrossjointherething

Problem

Is there a way to do what I want to call a "LEFT CROSS JOIN"?

I.e., is there a way to specify a CROSS JOIN ON, but return at least one row in the result for every row in the left, using nulls for the right-side columns when the right-side table does not contain a match?

Solution

This explanation took a bit of time to digest, but helped clarify for me that what I was looking for is in fact just a LEFT OUTER JOIN.

LEFT OUTER JOIN is logically, as they explain, a CROSS JOIN ON, followed by restoring any rows from the left side that were removed because they had no matches in the "ON".

(Posting this for others, because it reflects how I was searching before I understood.)

Context

StackExchange Database Administrators Q#305049, answer score: 6

Revisions (0)

No revisions yet.