Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Q: Constraints
Roger Wernersson <roger.wernersson_at_adra.se> wrote:
>ALTER TABLE a ADD CONSTRAINT b CHECK (NVL (c, '-') IN ('Y', 'N'));
>
>or
>
>ALTER TABLE a MODIFY b NOT NULL;
>ALTER TABLE a ADD CONSTRAINT b CHECK (c IN ('Y', 'N'));
From a clarity point of view, I would pick the second option. Can't say what the effect on performance would be.
Tel: (506) 854-7997
Fax: (506) 855-9673
dougm_at_nb.sympatico.ca
Received on Fri Nov 29 1996 - 00:00:00 CST