Re: Multi column check constraint
From: Alan <alanshein_at_erols.spambuster.com>
Date: 2000/05/19
Message-ID: <8g3f00$6je$1_at_bob.news.rcn.net>#1/1
Date: 2000/05/19
Message-ID: <8g3f00$6je$1_at_bob.news.rcn.net>#1/1
Depends on your RDBMS.
Jeff wrote in message ...
>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 Fri May 19 2000 - 00:00:00 CEST