Creating sequences inside stored procedures
Posted on 2000-02-14
I'm trying to write a stored procedure to create sequences. I will be bulk loading tables, and then I will want to reset the sequence to the next appropriate number.
CREATE OR REPLACE PROCEDURE TBLSPC."CreateSequencesOnOracle"
DECLARE Key Number;
SELECT MAX(ABCKey)+1 INTO Key FROM ABCTbl;
CREATE SEQUENCE SEQ_ABCKey
START WITH Key
INCREMENT BY 1
This example does not work. Can someone give me one that does?