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 nocycle; Create table t_my_tab (id number default seq_t.nextval primary key)
If you like dEexams.com and would like to contribute, you can also write your article here or mail your article to email@example.com . See your article appearing on the dEexams.com main page and help others to learn.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.