Thread: maintain number in variable

maintain number in variable

From
"Andrey"
Date:
Can I maintain id in variable such as:

CREATE FUNCTION function1() RETURNS int4
AS '
   $var = select nextval(''shipment_gen'');
   select $var;
'
LANGUAGE 'sql'

 

Andrey