Could only contain three values
SQL>
SQL>
SQL> create table courses
2 ( code VARCHAR2(6) constraint C_PK primary key
3 , description VARCHAR2(30) constraint C_DESC_NN not null
4 , category CHAR(3) constraint C_TYPE_NN not null
5 , duration NUMBER(2) constraint C_DUR_NN not null
6 , constraint C_CODE_CHK check (code = upper(code))
7 , constraint C_TYPE_CHK check (category in ('GEN','BLD','DSG'))
8 ) ;
Table created.
SQL>
SQL>
SQL> drop table courses;
Table dropped.
Related examples in the same category