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> select id#, decode(name,NULL
Blog Preserved by Mohammed Shakir Rahman (M$R)