Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What is "sequence"?
Kirill V. Florensky wrote:
>
> Hi
> Can any one please explain me what are "sequnces" ?
>
> Thanks
>
> Kirill
A sequence is a database object from which multiple users may generate unique integers. You can use sequences to automatically generate primary key value ( Oracle7 Server SQL Reference )
Example:
SQL*Plus: Release 3.2.2.0.0 - Production on Fri May 16 14:28:04 1997
Copyright (c) Oracle Corporation 1979, 1994. All rights reserved.
Enter password:
Connected to:
Oracle7 Server Release 7.2.2.3.0 - Production Release
With the distributed and parallel query options
PL/SQL Release 2.2.2.3.0 - Production
SQL> create sequence test start with 1 increment by 1;
Sequence created.
SQL> select test.nextval from sys.dual;
NEXTVAL
1
SQL> /
NEXTVAL
2
SQL> /
NEXTVAL
3
SQL> drop sequence test;
Sequence dropped.
Hope it helps
-- Alik Shapiro Oracle DBA, EDS Phone (317)240-7757 E-MAIL : fz1dmj_at_agt.gmeds.com The above statements and opinions are my own and do not necessarily represent those of EDS.Received on Fri May 16 1997 - 00:00:00 CDT