DEV Community

loading...

Discussion on: Conditional SQL JOIN

Collapse
gperja profile image
Genti Perja

Easier Way:
LEFT JOIN terms t ON t.terms_id = ISNULL(i.terms_id, v.default_terms_id)

Cheers :)

Forem Open with the Forem app