CHECK constraint question [message #374204] |
Wed, 30 May 2001 09:41 |
Mike
Messages: 417 Registered: September 1998
|
Senior Member |
|
|
I'm new to oracle and have a problem with setting up a constraint list. Example I am trying to setup a column in my table called rating, using VARCHAR2 as the type and 4 as the length. The check is for the ratings i.e g, pg, pg13, r, nc17, nr. Any help would be great either by email or post reply. Thanks
|
|
|
|
Re: CHECK constraint question [message #374211 is a reply to message #374207] |
Wed, 30 May 2001 11:18 |
Andrew again...
Messages: 270 Registered: July 2000
|
Senior Member |
|
|
Remember that the check constraint shown assumes that the column is set to NOT NULL. The constraint can be changed to block nulls too, but this is best done by:
alter table TableName modify (Rating not null);
|
|
|