title: Invalid datatype when adding constraint in Oracle
body: <p>I want to create this table in Oracle. This is only the table SQL script.</p>
  
  <pre><code>     -- CREATE TABLES SECTION -------------------------------------------------
  
  -- TABLE DATACENTER
  
  CREATE TABLE DATACENTER(
    DATACENTERID INTEGER NOT NULL,
    NAME VARCHAR2(80 ) NOT NULL,
    LOCATION VARCHAR2(200 ),
    DCALLOWEDWEIGHTKG NUMBER(9,0),
    DCMAXIMUMWEIGHTKG NUMBER(9,0),
    DCALLOWEDPOWERWATT NUMBER(9,0),
    DCMAXPOWERWATT NUMBER(9,0),
    DCALLOWCOOLINGPOWERBTU NUMBER(9,0),
    DCMAXCOOLINGPOWERBTU NUMBER(9,0),
    DESCRIPTION CLOB
  )
  /
  -- ADD KEYS FOR TABLE DATACENTER
  
  ALTER TABLE DATACENTER ADD CONSTRAINT DATACENTERID PRIMARY KEY (DATACENTERID)
  /
  
  -- TABLE COMPONENT
  
  CREATE TABLE COMPONENT(
    COMPONENTID INTEGER NOT NULL,
    DATACENTERID INTEGER,
    FKCOMPONENTID INTEGER,
    COMPONENTSTATSID INTEGER NOT NULL
  )
  /
  
  -- ADD KEYS FOR TABLE COMPONENT
  
  ALTER TABLE COMPONENT ADD CONSTRAINT COMPONENTID PRIMARY KEY (COMPONENTID)
  /
  -- CREATE RELATIONSHIPS SECTION ------------------------------------------------- 
  
  ALTER TABLE COMPONENT ADD CONSTRAINT IS PART OF A FOREIGN KEY (DATACENTERID) REFERENCES DATACENTER (DATACENTERID)
  /
  
  ALTER TABLE COMPONENT ADD CONSTRAINT IS A SUBPART OF FOREIGN KEY (FKCOMPONENTID) REFERENCES COMPONENT (COMPONENTID)
  /
  </code></pre>
  
  <p>The error stack:</p>
  
  <pre><code>table DATACENTER created.
  table DATACENTER altered.
  table COMPONENT created.
  table COMPONENT altered.
  
  Error starting at line 39 in command:
  ALTER TABLE COMPONENT ADD CONSTRAINT IS PART OF A FOREIGN KEY (DATACENTERID) REFERENCES DATACENTER (DATACENTERID)
  Error report:
  SQL Error: ORA-00902: invalid datatype
  00902. 00000 -  "invalid datatype"
  *Cause:    
  *Action:
  
  Error starting at line 42 in command:
  ALTER TABLE COMPONENT ADD CONSTRAINT IS A SUBPART OF FOREIGN KEY (FKCOMPONENTID) REFERENCES COMPONENT (COMPONENTID)
  Error report:
  SQL Error: ORA-00902: invalid datatype
  00902. 00000 -  "invalid datatype"
  *Cause:    
  *Action:
  </code></pre>
  
  <p><strong>EDIT</strong> I edited the code because I saw that some SQL statements are missing.
  I can provide the schema if you want?</p>
  
  <p>Best wishes</p>