here is the Example Code;
CREATE SEQUENCE mySEQ START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 1000000 NOCYCLE NOCACHE ORDER
declare
SequenceValue number;
begin
EXECUTE IMMEDIATE 'select mySEQ.nextval from dual' INTO SequenceValue;
---Now you can Use SequenceValue anywhere
end;
/
drop sequence mySEQ
/
No comments:
Post a Comment