Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can Check Constraints be Reused for Multiple Columns?

Re: Can Check Constraints be Reused for Multiple Columns?

From: Andreas Sheriff <spamcontrol_at_iion.com>
Date: Mon, 8 Aug 2005 16:48:26 -0700
Message-ID: <abSJe.34430$bp.19772@fed1read03>


"GeoPappas" <PappasG_at_gmail.com> wrote in message news:1123525527.687653.327550_at_f14g2000cwb.googlegroups.com...
>I have a bunch of columns that are a CHAR(1) and should only contain
> "Y" (for Yes) and "N" (for No).
>
> Instead of creating a separate check constraint for each and every
> column, is there a way to set up one check constraint and reuse it for
> multiple columns?
>
> Or is there a better way of doing this?
>

Hey guys. Why so complex? Won't a simple foreign key constraint do?

-- 
Andreas
Oracle 9i Certified Professional
Oracle 10g Certified Professional
Oracle 9i Certified PL/SQL Developer


"If you don't eat your meat, you cannot have any pudding.
"How can you have any pudding if you don't eat your meat?!?!"
---

WARNING:
DO NOT REPLY TO THIS EMAIL
Reply to me only on this newsgroup 
Received on Mon Aug 08 2005 - 18:48:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US