DEFAULT ON NULL Feature in Oracle 12c Prior to 12c, the DEFAULT for a column would not be applied if you explicitly or implicitly inserted a NULL into that column. The functionality has been limited with various restrictions. For example you are restricted from using a SEQUENCE object to supply a default value. If there is a need to insert or update the default value you have to either use DEFAULT keyword into the statement or leave the column out of the INSERT statement entirely. In fact adding a new column that permists NULL values with a dfault values was an offline operation. SQL> create table TEST (id# number, name varchar2(20) default 'SPACE'); Table created. SQL> insert into TEST values (1,NULL); 1 row created. SQL> select id#, decode(name, NULL,'Null',name) from TEST; ID# DECODE(NAME) ---------- ---------- 1 Null 1 row selected. SQL> insert into TEST(id#) values (2); 1 row created. SQL> ...
Invisible Column feature in Oracle 12c Oracle 12c allows a coulnm to be invisible. Invisible coulnm are considered only when they are explicitly referred, otherwise they are ignored for queries and DML operations. Sometimes it requires to hide particualr column from developers thus they can not include these data in reports. You can make a column visible or invisible whenever required using ALTER TABLE command: CREATE TABLE INV_EMP (EMP# NUMBER(4), SALARY NUMBER(8,2) INVISIBLE) INSERT INTO INV_EMP (EMP#,SALARY) VALUES (101, 6000); INSERT INTO INV_EMP VALUES(102); SQL> select * from INV_EMP; EMP# ----------- 101 102 SQL> select EMP#,SALARY from INV_EMP; EMP# SALARY ---------- ------------- 101 6000 102 SQL> ALTER TABLE INV_EMP MODIFY (SALARY VISIBLE); SQL> ...