What is a sequence?

Showing Answers 1 - 17 of 17 Answers

ammasmohan

  • Oct 4th, 2005
 

Sequence are nothing but which • Automatically generates unique numbers• Is a sharable object• Is typically used to create a primary key value• Replaces application code• Speeds up the efficiency of accessing sequencevalues when cached in memory

ammasmohan

  • Oct 4th, 2005
 

A sequence is a user created database object that can be shared by multiple users to generate unique integers. A typical usage for sequences is to create a primary key value, which must be unique for each row. The sequence is generated and incremented (or decremented) by an internal Oracle routine. This can be a time-saving object because it can reduce the amount of application code needed to write asequence-generating routine. Sequence numbers are stored and generated independently of tables. Therefore, the same sequence can be used for multiple tables.

  Was this answer useful?  Yes

Sequence is a Database object used to generate unique sequential integer values. the syntax is

CREATE SEQUENCE <SEQUENCENAME>

START WITH <INT>

MIN VALUE/NOMINVALUE<INT>

MAXVALUE/NOMAXVALUE<INT>

INCREMENT BY

CYCLE/NOCYCLE

CACHE/NOCACHE;

EX:CREATE SEQUENCE SEQ1

                                        INCREMENT BY 1

                                        START WITH 1

                                        MINVALUE 0

                                        NOCYCLE

                                        NOCACHE

                                        NOORDER;

All defination of sequence is correct given by all but the sequence has it's limitation.

1.Once the number skips ,it cannot be recovered.

2.u can use the same sequence with any table.

e.g select seq1.nextval from emp; select seq1.nextval from dept.

so the number once skiped cannot be recovered.

dilip bhattad

  • Apr 19th, 2006
 

Sequence is an oracle object that can generate numeric value in sequence.

  Was this answer useful?  Yes

Pawan Ahuja

  • Dec 9th, 2006
 

A sequence is database object basically used for generating primary key number and many user can share the sequence.

Regards

Pawan Ahuja

  Was this answer useful?  Yes

eswar

  • Jul 31st, 2007
 

Sequence is nothing but a database object which creates an integer value automatically with out duplicates.

  Was this answer useful?  Yes

Mohammed Abdul Afroze

  • Sep 27th, 2007
 

A sequence generates a list of unique numbers that identifiy the rows and columns of a table.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions