Here’s a way to advance a sequence using an anonymous PL/SQL block:
DECLARE
mn integer;
mx integer;
BEGIN
SELECT MYPROJ.personnelid_seq.CURRVAL INTO mn FROM DUAL;
SELECT max(personnelid) INTO mx FROM MYPROJ.personnel;
WHILE mn
Here’s a way to advance a sequence using an anonymous PL/SQL block:
DECLARE
mn integer;
mx integer;
BEGIN
SELECT MYPROJ.personnelid_seq.CURRVAL INTO mn FROM DUAL;
SELECT max(personnelid) INTO mx FROM MYPROJ.personnel;
WHILE mn