Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

restrict the column values

Anjan SilJul 24 2012 — edited Jul 24 2012
Hi,

I want to create one table with a column that will contain only selected values.
e.g.

create table meal_choice (
name varchar2(50),
meal_choice varchar2(20)
);

Now, in this case, I want to restrict the value of meal_choice to 'VEG' or 'NON-VEG'.

Can you please tell me how this can be done?
I'm using Oracle 11.2.0.1.

Thanks,
Anjan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2012
Added on Jul 24 2012
1 comment
16,067 views