Multi column check constraint

From: Jeff <>
Date: 2000/05/18
Message-ID: <h_WU4.803$>#1/1

Suppose I need to enforce a rule where if one column is null, the other must be not null and vice versa.

I have the following table:

create table foobar
( ...

    item_link_no char(10),
    voucher_id int,

Can a check constraint be written such that if item_link_no is null then voucher_id must be not null and vice versa?

Jeff Received on Thu May 18 2000 - 00:00:00 CEST

Original text of this message