Answer the question
In order to leave comments, you need to log in
How to make a selective check for not null in a table (check constraint)?
Hello colleagues.
The question is so simple: there is a table with fields FIELD_A, FIELD_B and FIELD_C. It is
necessary to set the following restrictions:
A and B must be filled (NOT NULL), and then C must be NULL
or C must be filled, but then both A and B must be NULL
That is, either there is C and there should not be either A or B, or both A and B are (required together), but then there should not be C.
Answer the question
In order to leave comments, you need to log in
Need to set limitsDependence of values in a kartage is a violation of the normal form.
I would do so.
In the first table, select a related table. Either table 2 or table 3.
In table 2, values A and B, in table 3, values C.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question