I have a sequence in the database, and I wanted to call the sequence through a function.
I have tried below, need an assistance to create the function in a standard process, as this is not working.
select nextval('code_seq')
CREATE FUNCTION code_sequence(integer) RETURNS integer
LANGUAGE SQL
IMMUTABLE
return select nextval('code_seq');
3
Answers
I am able to achieve using below statements,
check out this solution
try this :
call it like this :