Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle CURRVAL Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: CURRVAL

Definition:
The Oracle CURRVAL function is used to access the current value of the specified sequence. Note that CURRVAL can only be used if NEXTVAL has been referenced in the current user session at least once.

You cannot use CURRVAL and NEXTVAL in the following constructs:


Example Usage:

CREATE SEQUENCE seq_2 
INCREMENT BY 1 START WITH 1
MAXVALUE 50 MINVALUE 0
NOCYCLE CACHE 20 ORDER;

CREATE TABLE table1 (col1 int, col2 int);
INSERT INTO table1 VALUES (0, 0);


You may also want to see the entries for NEXTVAL and SEQUENCEs.

Related Links:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 80 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?