title: Partition exchange column type or size mismatch (ORA-14097)
body: <p>I'm trying to do a exchange partition on a database and I'm having the following error: <em>ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITION</em></p>
  
  <p><strong>The script</strong> that does this was already created and it <strong>was running as expected on an Oracle 11g database</strong>. As soon as I've updated to 12c I've got this problem. This is how I'm doing the partition exchange:</p>
  
  <pre><code>-- The new partitioned table.
  CREATE TABLE NEW_TABLE
  (
    id             NUMBER(18) NOT NULL,
    message        VARCHAR2(4000) NOT NULL,
    details        VARCHAR2(4000),
    partition_time TIMESTAMP(6) DEFAULT to_timestamp('01-01-2016','dd-mm-yyyy HH24:MI') NULL
  ) NOCOMPRESS LOGGING 
    PARTITION BY RANGE (partition_time) INTERVAL (NUMTODSINTERVAL(1,'HOUR'))
     (PARTITION initial VALUES LESS THAN (to_timestamp('01-01-2016','dd-mm-   yyyy HH24:MI')));
  
  -- The old table.
  CREATE TABLE OLD_TABLE
   (
    id            NUMBER(18,0) NOT NULL,
    message         VARCHAR2(4000 byte) NOT NULL,
    details           VARCHAR2(4000),
  );
  
  -- Add the column that does not exist on the old table (keep the same columns).
  ALTER TABLE OLD_TABLE ADD partition_time TIMESTAMP(6) DEFAULT to_timestamp('01-01-2016','dd-mm-yyyy HH24:MI') NULL;
  
  ALTER TABLE NEW_TABLE
  EXCHANGE PARTITION INITIAL
  WITH TABLE OLD_TABLE
  WITHOUT VALIDATION;
  
  (...)
  </code></pre>
  
  <p>Now, once again, on Oracle 11g this was working perfectly. On Oracle 12c I've got the error explained above. I've did some research and I've seen people talk about INVISIBLE columns. Well, I've recreated the OLD_TABLE so I think there will be no invisible columns.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I've realized that on Oracle 12c when I try to alter the table to create a new column another invisible column is created (named SYS_NC00011$). This is why the partition exchange is not working. My question now is why is this happening and what is the best way to "remove this column" ? Already tryied to drop unused columns with no success.</p>
  
  <p>Thank you guys!</p>