create or replace function getnull_number
(p_number in varchar2)
return varchar2
is
v_null varchar2(30);
begin
if length(p_number)=2
then
select ' ' into v_null from dual;
else
select ' ' into v_null from dual;
end if;
return v_null;
end;
select getnull_number(20) from dual;
select getnull_number(99) from dual;
则返回两个空格