title: Oracle database error message in foreign key
body: <p>I'm newbie in oracle and trying to create a table with a foreign key, however, an error keeps appearing, and I don't know what is wrong.</p>
  
  <p>This is the little code, and when I try to create "UNIDADESMEDIDA" the error pops up:</p>
  
  <pre><code>create table TIPOUNIDAD(
      ID_TIPOUNIDAD char(20) not null,
      constraint TIPOUNIDAD_PK primary key(ID_TIPOUNIDAD)
  );
  
  create table UNIDADESMEDIDA(
      ID_UNIDADMEDIDA integer not null,
      constraint UNIDADESMEDIDA_PK primary key(ID_UNIDADMEDIDA),
      constraint TIPOUNIDAD_FK foreign key(ID_TIPOUNIDAD) references TIPOUNIDAD(ID_TIPOUNIDAD)
  );
  
  Error report -
  ORA-00904: "ID_TIPOUNIDAD": invalid identifier
  00904. 00000 -  "%s: invalid identifier"
  *Cause:    
  *Action:
  </code></pre>
  
  <p>Any suggestion?</p>