Hello…
I came to situation where I have to join 2 tables on some other table:
some_table:
id
domain
table domains:
id
domaintype_id
domain
table domaintypes:
id
type
This is how I join:
domains ON some_table.domain = domains.domain
domaintypes ON domaintype.id = domains.domaintype_id
Now it happens that sometimes there is no domain for some_table row (so the domaintype will be NULL) and I want to be able to set this column default value 0 (when that happens)…
How is it possible to do that?
Many thanks in advance!