Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> sequence currval
Hello
User's manual says:
This example selects the current value of the employee sequence: SELECT empseq.currval
FROM DUAL; I don'n understand. Way "FROM DUAL" ???
I have got a table with pimary keys. I insert into that tabel by:
INSERT INTO flfraga (id,
VALUES (flfraga_seq.NEXTVAL);
Later in my stored procedure I what to access the flfraga_seq.CURRVAL
and store it
in a variable:
select flfraga_seq.CURRVAL into k;
Now, that doesn't work. Nor does select flfraga_seq.CURRVAL into k from
dual;
or select flfraga_seq.CURRVAL into k from flfraga;
Must i first insert the flfraga_seq.CURRVAL into a special tabel and
then select it????
The I coud just as well use select max(id) into k from flfraga ;
/ Mattias Received on Sun Sep 12 1999 - 05:49:38 CDT
![]() |
![]() |