alter table ivc.merit_matches add constraint priced_or_slotted_job check ((survey_code is null and slot_job_code is not null) or (slot_job_code is null and survey_code is not null)); results in: Check constraints: "priced_or_slotted_job" CHECK (survey_code IS NULL AND slot_job_code IS NOT NULL OR slot_job_code IS NULL AND survey_code IS NOT NULL)
What happened to my parens around the and conditions? I am not aware of any precedence of and over or - Am i misinformed?