home bbs files messages ]

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 344 of 2,288   
   Guido Konsolke to Hari Om   
   Re: CHECK Constraint   
   08 Sep 03 13:25:54   
   
   From: Guido.Konsolke@triaton.com   
      
   "Hari Om"  wrote in   
    news:d1d5ebe4.0309051319.33b3c3b2@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!   
      
   Hi Hari Om,   
      
   your example works for me. What do you mean   
   with 'seems to freak out'? By the way: I prefer   
   the 'alter table... add constraint...' statement.   
   In this I can easily define descriptive names   
   for them.   
      
   hth,   
   Guido   
      
   --- 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