Home > DeveloperSection > Interviews > How to create sequence in oracle?

Posted on    August-12-2011 1:54 AM

 MSSQL Server MSSQL Server 
 1 Answer(s)
  1464  View(s)
Rate this:

Amit Singh

Total Post:565

Posted on    August-12-2011 12:00 AM

A sequence is an object in Oracle that is used to generate a number sequence. This can be useful when you need to create a unique number to act as a primary key.

The syntax for a sequence is:

CREATE SEQUENCE sequence_name
    MINVALUE value
    MAXVALUE value
    START WITH value
    INCREMENT BY value
    CACHE value;

Don't want to miss updates? Please click the below button!

Follow MindStick