title: Composite Foreign Key - Possible In Oracle?
body: <p>I am trying to create a relation/table in Oracle that is between two many to many tables and therefore the Primary key of this table is a composite key but both keys are foreign.</p>
  
  <pre><code>CREATE TABLE employee_licence_certificate(
      emp_id NUMBER(4) REFERENCES employee(emp_id)
      , licence_cert_code VARCHAR2(6) REFERENCES licence_certificate(licence_cert_code)
      , date_earned DATE NOT NULL
      ) 
  PRIMARY KEY (emp_id, licence_cert_code))
  </code></pre>
  
  <p>I have tried using the method for composition keys but I seem to get the following error, which is starting to make me wonder is this even possible?</p>
  
  <pre><code>Error starting at line 1 in command:
  CREATE TABLE employee_licence_certificate(emp_id NUMBER(4) REFERENCES employee(emp_id)
  , licence_cert_code VARCHAR2(6) REFERENCES licence_certificate(licence_cert_code)
  , date_earned DATE NOT NULL) PRIMARY KEY (emp_id, licence_cert_code))
  Error at Command Line:3 Column:29
  Error report:
  SQL Error: ORA-00922: missing or invalid option
  00922. 00000 -  "missing or invalid option"
  *Cause:    
  *Action:
  </code></pre>