title: oracle sql, creating table with foreign key
body: <p>I just started sql and I have trouble creating a table with a foreign key.
  I created the parent table with no trouble but just can't seem to figure it out, any help please? thanks </p>
  
  <p>the parent table:</p>
  
  <pre><code>Create table instructor( 
      InstructorName varchar(255) not null primary key,
      instructoremaill varchar(255) not null,
      biography varchar(255) not null,
      specialty varchar(255) not null
  );
  </code></pre>
  
  <p>And the code that is giving me troubles. I'm trying to create a table where, it will delete any sessions if an instructor is deleted from the database</p>
  
  <pre><code>Create table timetable( 
      number(10) not null,
      dayandtime string not null,
      numberofplaces number(10) not null,
      classname varchar(255) not null,  
      venuename varchar(255) not null,  
      primary key (sessionid),
      Constraint fk_instructorname 
      foreign key (instructorname)REFERENCES instructor(instructorname)
      on delete cascade
  ); 
  </code></pre>