function nextid return number as ret number(10,0); begin /*ident*/ select ident.nextval into ret from dual; return ret; end nextid;