Skip to main content

12 Posts on 12c: Invisible Columns

Oracle 11g introduced the invisible indexes feature. Oracle 12c now introduces DBAs and developers to use of invisible columns.

To create an invisible column, define a table as you normally would, and add the INVISIBLE flag, like so:

In this case, the HOME_PHONE column is invisible. But what does that mean? Can you insert into the invisible column? Yes!


What happens if you try to SELECT from the table?


It's not there. What happens if I try to specifically select the invisible column?


Well, now it's visible. WTF? So what good is this slightly invisible column? Invisible columns are NOT a security measure. They are a means of allowing developers a means to support activities where data can be stored in the database without obvious access to the data.

What? No, seriously, this is a real thing. And Oracle has a feature which uses this functionality (of course). Temporal Validity. Check it out, it's pretty sweet, if Information Life Cycles are your thing.

Besides Temporal Validity, development teams using continuous integration can allow use this feature to support multiple versions of a data model by continuing to write data to both visible and invisible columns.

Invisible columns, like visible columns, can be indexed. Statistics are also collected on invisible  columns.

NOTE: Invisible columns are not displayed when a table is DESCRIBEd, but are available in *_TAB_COLS views.


Comments