Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 367 of 2,288    |
|    Mike Sherrill to Hari Om    |
|    Re: CHECK Constraint    |
|    12 Sep 03 13:03:21    |
   
   From: MSherrill@compuserve.com   
      
   On 5 Sep 2003 14:19:59 -0700, hari_om@hotmail.com (Hari Om) wrote:   
      
   >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'))   
   >   
   >)   
      
   FWIW, those aren't ZIP codes. Consider putting all your postal codes   
   into a table and set a foreign key reference to it.   
      
   --   
   Mike Sherrill   
   Information Management Systems   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca