So I'm writing a stored procedure and am having trouble getting the next value of a sequence into a variable.
The sequence name is passed into the function and is stored as a varchar2
variable. How can you get the next value in that sequence into a local variable.
EXECUTE IMMEDIATE 'BEGIN :ret := '||p_sequence_name||'.nextval; END;' USING OUT v_nextval;
– Crackleware