View Single Post
  #2 (permalink)  
Old 05-24-2006, 03:39 AM
irfanhab irfanhab is offline
Junior Member
 
Join Date: May 2006
Posts: 10
irfanhab is on a distinguished road
Default Oracle answer. Re: How to impose a check that a certain field can only contain a certain domain of values?

You can use SQL's CHECK Constraints
Consider that the field is called "timeperiod" and the table is called "day"
[sql]
alter table day add check (timeperiod in ('AM', 'PM'));
[/sql]
Reply With Quote