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

Posted on    August-12-2011 1:54 AM

 MSSQL Server MSSQL Server 
Ratings:
 1 Answer(s)
  1308  View(s)
Rate this:

Amit Singh

Total Post:565

Points:2825
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