Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: What is "sequence"?
Mario Methot wrote:
>
> HI,
>
> Sequence is a feature use to generate unique numbers. These numbers can be
> use as primary key of the table. You must create it first (create
> sequence...), and then you have to select select sequence_name.nextval from
> dual to obtain then unique number. There are several parameters you can
> use when you create it.
>
You do not have to select the nextval or currval from dual. You can use
any table
in the database.
If you are inserting a row into a table you can
insert into emp(empno, ename)
values (seq_name.nextval, 'EMP');
-- ---------- Greg Pucka Management Consultant, TUSC puckag@tusc.com --- http://www.tusc.comReceived on Sat May 17 1997 - 00:00:00 CDT
![]() |
![]() |