cancel
Showing results for 
Search instead for 
Did you mean: 

Constraint which doesn't allow NULL values (or empty string) in fk column

huber1
Participant
0 Kudos
2,655

Hi

I have, for example, the following constraint:

ALTER TABLE hades.persons_roles ADD CONSTRAINT persons_role_precised_by_fk FOREIGN KEY ( role_supplementary_name, role_supplementary_role_id ) REFERENCES hades.role_supplementaries ( name, role_id );

The column role_supplementary_name contains valid names, the column role_supplementary_role_id contains currently some NULL values. Although reading the DOCX, I can't seem the find the correct notation for NOT allowing NULL values in this constraint. Any hint?

Thanks and regards, Robert

Accepted Solutions (0)

Answers (0)