Using sequence in PL/SQL

Creating sequence which start with 100

create sequence my_seq start with 100;

Using sequence in PL/SQL

DECLARE
v_number NUMBER;
BEGIN
v_number := my_seq.NEXTVAL;
dbms_output.put_line('sequence value:'||v_number);
END;

Output:

Leave a Reply

Your email address will not be published. Required fields are marked *