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)

If you like and would like to contribute, you can also write your article here or mail your article to . See your article appearing on the 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.

Python if , elif and else

Python Conditions and If statements

  • 0
Python for beginners

Learning Python Part 1

  • 3
Struct Alignment and Padding

Struct Alignment and Padding in C++ And C

  • 0
Friend function

Friend function C++

  • 0

C++ Pointers

  • 0

C++ Structures

  • 0
Types of Inheritance in C++

Inheritance and access specifiers C++

  • 0
Java date pattern

Java Date Pattern Syntax

  • 0
Java Date and Calendar

Java Date formats

  • 0
JAVA Data Type

Data types in Java

  • 0
Java unreachable code

Unreachable Code Error in Java

  • 0

Post Comment


Commenter Profilr Pic

Anonymous on Jan 02, 2019 at 02:53 pm favorite one...Thanks oracle..




Forgot Password

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