Try it here
Sequence in Oracle 12C

Sequence can be used as Default value


Before Oracle 12c we couldn't have sequence as default value for a column, but now we can use sequence as default value as sequence.nextval.

When new row is added, sequence automatically increments and writes the column.

Below is the example:

Create sequence seq_t
start with 1 
increment 1 

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

Writer profile pic

Uk01 on Jan 02, 2015 at 12:01 am

If you like and would like to contribute, you can write your article here or mail your article to . See your article appearing on the main page and help others to learn.

Post Comment

Comments( 1)

Commenter Profilr Pic

Anonymous on Jan 02, 2019 at 12:00 am favorite one...Thanks oracle..


Forgot Password

Please enter your email address below and we will send you information to change your password.