I would like the solution to enforce the constraint only if the column is not null. I can't seem to find a way to do this in the documentation.
create table mytable(
table_identifier_a INTEGER,
table_identifier_b INTEGER,
table_value1,...)
Make for the nature of the data, I will have identifier b and value when creating the table. After receiving additional data, I can fill in the identifier a. At this point, I would like to provide unique key of (identifier_a, value1), but only if identifier_a exists.
Hope this makes sense, does anyone have any ideas?
source
share