Adsense Ad

Tuesday 3 September 2019

Oracle 12c New Features " Invisible columns "


The idea of invisible columns is similar to the idea of creating a view on a table while leaving out the columns that you do not want the end-user to see.

In 12c R1, you can now have an invisible column in a table. When a column is defined as invisible, the column won’t appear in generic queries, unless the column is explicitly referred to in the SQL statement or condition, or DESCRIBED in the table definition. It is pretty easy to add or modify a column to be invisible and vice versa:

SQL> CREATE TABLE emp (
      eno number(6), 
      ename name varchar2(40), 
      sal number(9) INVISIBLE
      );

You must explicitly refer to the invisible column name with the INSERT statement to insert the database into invisible columns. A virtual column or partition column can be defined as invisible too. However, temporary tables, external tables, and cluster tables won’t support invisible columns.

No comments: