Table Enhancements
- Oracle 12c offers you to create invisible columns, these columns are not visible until you explicitly mention their names in the SQL statement. This functionnality allows developpers to make change to the database without conflicting with the existing application.
- To create an invisible column:
SQL> CREATE TABLE TEST (ID INT, TEXT VARCHAR2(100));
Table created.
SQL> ALTER TABLE TEST ADD (COMMENTS VARCHAR2(400) INVISIBLE);
Table altered.
- You can’t create invisible columns on :
- External Table
- Cluster Tables
- Temporary tables
- The views DBA_TAB_COLS, ALL_TAB_COLS, USER_TABLE_COLS now have a HIDDEN_COLUMN column to verify which column is visible or not.
- In SQL*PLUS you can also use the following :
SQL> SET COLINVISIBLE ON
- To make a column visible:
SQL> ALTER TABLE TEST MODIFY (COMMENTS VISIBLE);
Continue reading OCP 12C – Index and Table Enhancements →