Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Check Constraint Question
Tamara,
All you need to do is specify that your column is nullable when you create the table, and then create your check constraint.
The CC is fired only when the column is updated to a non null value.
Jared
On Tue, 26 Sep 2000, Tamara Swilley wrote:
> 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?
>
> Thanks in advance,
>
> Tamara Swilley
> AGENCY.COM-Avon
> tswilley_at_agency.com
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Tamara Swilley
> INET: tswilley_at_agency.com
>
> 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).
>
Jared Still
Certified Oracle DBA and Part Time Perl Evangelist ;-)
Regence BlueCross BlueShield of Oregon
jkstill_at_bcbso.com - Work - preferred address
Received on Tue Sep 26 2000 - 19:34:51 CDT
![]() |
![]() |