nullsNotDistinct on composite unique
I have the following table
My wish is to be able to add how many customers as possible to a specific tenant_id with null email and no constraint. But only one customer per email and per tenant should be allowed.
The above solution doesn't work and I want to be able to specifically target "nullsNotDisticint" on the email column only and not the whole composite unique key.
How can I solve this?
0 Replies