Create Table with Int-attribute which can only use values between 6 and 36 Hello I'm learning for my databases examination and in one exercise they asking for creating a table with a attribute which can only use values between 6 and 36. How do I solve it? 

We used in the course always Oracle databases and not mysql. 

Here is the original text of the exercise (in german language):

Erstellen Sie eine Tabelle PROJEKTE. Projekte haben einen Namen, eine 
Projektnummer, die Personalnummer eines Professors, der die Rolle des Projektleiters 
übernimmt, einen Starttermin und eine Laufzeit (ganze Zahlen zwischen 6 und 36).
Most likely, the intention is for you to create a table and a CHECK constraint on the table

CREATE TABLE foo (
  col1 integer check( col1 between 6 and 36 )
);


And a demonstration that it works

SQL&gt; CREATE TABLE foo (
  2    col1 integer check( col1 between 6 and 36 )
  3  );

Table created.

SQL&gt; insert into foo values( 5 );
insert into foo values( 5 )
*
ERROR at line 1:
ORA-02290: check constraint (SCOTT.SYS_C0047240) violated


SQL&gt; insert into foo values( 37 );
insert into foo values( 37 )
*
ERROR at line 1:
ORA-02290: check constraint (SCOTT.SYS_C0047240) violated


SQL&gt; insert into foo values( 12 );

1 row created.