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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Check Constraint Question

RE: Check Constraint Question

From: DEVERGE Philippe <Philippe.DEVERGE_at_opt.nc>
Date: Wed, 27 Sep 2000 11:15:10 +1100
Message-Id: <10631.117930@fatcity.com>


Hi tamara,

        a sample of a creation table script with a check constraint ...

CCP_GES_ACH                  CHAR(1)                null   =20
        constraint CC_SRF_CCP_GES_ACH check (CCP_GES_ACH is null or
(CCP_GES_ACH in ('0','1'))),
....
	Regards
	PHD


> -----Message d'origine-----
> De: Tamara Swilley [SMTP:tswilley_at_agency.com]
> Date: mercredi 27 septembre 2000 11:21
> =C0: Multiple recipients of list ORACLE-L
> Objet: Check Constraint Question
>=20
> Hi Experts!
> Can a check constraint include a null value? I have a
> requirement to add a check constraint to a column with a
> two-digit "type". The column can be null, but if it has a
> value is has to be one of the specified values.
> For example, the requirements state values can be "AB, BC,
> CD, DE, with a null indicating type AB". All the examples
> of check constraints I've seen don't show a null value
> allowed. Would I say something like ... values in
> ('AB','BC','CD','DE',NULL)... or is this even possible? If
> it IS possible, how would the syntax look?
>=20

> Thanks in advance,
>=20

> Tamara Swilley
> AGENCY.COM-Avon
> tswilley_at_agency.com
>=20
>=20

> --=20
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --=20
> Author: Tamara Swilley
> INET: tswilley_at_agency.com
>=20

> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing =
Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Tue Sep 26 2000 - 19:15:10 CDT

Original text of this message

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