DEV Community

Cover image for Conditional Column Join in SQL

Conditional Column Join in SQL

gschro on December 14, 2018

Sometimes in the world of legacy enterprise systems you're tasked with what sounds exactly like a problem on Code Signal or similar platforms. The ...
Collapse
 
seimic profile image
seimic

you can have it shorter too

nvl(table1.letter, table2.letter) = table2.letter

Collapse
 
gschro profile image
gschro

That's much more succinct! Thanks for sharing!

Collapse
 
andreasneuman profile image
andreasneuman

You know, I also was searching for the right way for working with SQL JOINS and have tried various solutions. I think SQL Complete is a pretty good tool

Collapse
 
geshan profile image
Geshan Manandhar

The power of SQL demonstrated. Good work!

Collapse
 
yairpe profile image
yairpe

Good solution. Just what I was looking for
THANKS :)