Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: CHECK Constraints
"Hari Om" <hari_om_at_hotmail.com> wrote in message
news:d1d5ebe4.0309051319.742b0867_at_posting.google.com...
> Hi ORAPERTS (ORAcle xPERTS)
>
> How can I define a CHECK CONSTRAINT on a table for a field like zip
> code....?
>
> Here is what I am doing:
> create table test
> (
> state varchar2(5) check (state
> in('AL','AK','AZ','AR','CA','CO','CT','DE'))
>
> )
>
> but it seems that it freaks out....wonder why...? I tried using DOUBLE
> QUOTES also but in vain....what is a correct way?
>
> THANKS!
I assume that you are trying to execute this DDL statement using SQL*Plus.
If so, then by "freaks out" you probably mean it does not like the blank
line.
If this is the case, do either:
--or--
2. Issue the following SQL*Plus command prior to executing the DDL:
SET sqlblanklines ON
.
Cheers Received on Fri Sep 05 2003 - 23:31:44 CDT
![]() |
![]() |