| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: CHECK Constraints
hari_om_at_hotmail.com (Hari Om) writes:
> 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'))
> )
Try this:
,----
| create table test
| (
| state varchar2(5) constraint test_c_state (
| state in('AL','AK','AZ','AR','CA','CO','CT','DE')
| )
| );
Harald Received on Sat Sep 06 2003 - 03:05:58 CDT
![]() |
![]() |