Over a million developers have joined DZone.

Oracle 12c's New Features For Developers

DZone's Guide to

Oracle 12c's New Features For Developers

An overview of Oracle 12c's new features, including invisible columns, identity columns, and having multiple indexes on the same column.

· Database Zone ·
Free Resource

Running out of memory? Learn how Redis Enterprise enables large dataset analysis with the highest throughput and lowest latency while reducing costs over 75%! 

Oracle Database 12c with “multitenant” architecture database management gets very easy. It provides pluggable database environment. It can consists many database in one environment. All databases getting together share same backgroud proseses and memory. This architecture makes database management easier and at the same time it provides an environment for cloud architecture.

With Oracle Database 12c a lot of useful features came out for DBAs and developers.  In this article I mention some of new features for database developers.

Sequence as Default Value 

Before Oracle 12c we have to assign the variable or column seqeunce using sequence.nextval, but now we can use sequence as default value. when new row is added sequence automatically increments and writes the column. It can be shown an example below:

Create sequence seq_t start with 1 increment 1 nocycle;

Create table t_my_tab (id number default seq_t.nextval primary key)

Invisible Column

Another new feature is we can define a table column as invisible columm. when we define column as invisible it is not being fetched when we use generic query like "select * from" . It can be queried by only direct usage like "select invcolumn from ..". This feature is useful especially when we dont need that column instead of drop it or some security reasons for example password column etc.

ALTER TABLE t_my_tab  MODIFY (pwd invisible);

Multiple Indexes On the Same Column

Multiple indexes on the same column cannot be created in prior version. With oracle 12c this is possible but multiple indexes must be different types like BitMap,B-Tree etc.

Varchar2 Length to 32,767 Bytes

The maximum size of the VARCHAR2, NVARCHAR2, and RAW data types has been increased from 4,000 to 32,767 bytes. 

Top-N Feature

With Oracle 12c new keywords came out for Top-N queries.  It can be shown an example below:

SELECT value FROM t_deneme



Identity Columns

With Oracle 12c we can define a column as identity column. When new row is added sequence automatically increments and writes the column. It can be shown an example below:

create table t_my_tab (

id number generated as identity,



With Clause

We can use pl/sql in select query using new with clause. It can be shown an example below:






SELECT f_incr(1)

FROM dual;

Running out of memory? Never run out of memory with Redis Enterprise databaseStart your free trial today.

database ,oracle ,sql ,pl/sql ,12c ,new features

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}