title: How to change the size of a column with FOREIGN KEY constraint?
body: <p>There are two tables</p>
  
  <pre><code>DEPT (
      DEPT_ID NUMBER(5) PRIMARY KEY,
      DEPT_NAME VARCHAR2(10)
  );
  
  COURSE (
      COURSE_ID NUMBER(5) PRIMARY KEY,
      COURSE_NAME VARCHAR2(15),DEPT_ID NUMBER(5),
      FOREIGN KEY(DEPT_ID) REFERENCES DEPT
  )
  </code></pre>
  
  <p>I want to change the size equal to <code>5</code> of the column <code>DEPT_ID</code> which has a <code>FOREIGN KEY</code> constraint.  </p>
  
  <p>I tried changing but it gives error:</p>
  
  <blockquote>
    <p>ORA-02267: column type incompatible with referenced column type</p>
  </blockquote>
  
  <p>Which is because it violates the foreign key constraint.</p>
  
  <p><strong>I didn't supplied any name to the foreign key while creating tables</strong>. So how can I do it without dropping any table.??</p>