oracle - PL/SQL function returning no value -


i getting ora-06503 error "function returned without value". wanted know whether error occurs when query inside function finds null value , function trying return null value retrieved ? here function outline -

function getemailaddress (user in varchar2) return varchar2 v_email             xxxxtable.email%type; begin  select email    v_email    xxxxtable   user_id = user;  return v_email; exception  when others    return constantvalue; end getemailaddress; 

any clarification here helpful

thanks

returning null still counts returning value. selecting no rows raises error. possibly trapping exception when others clause, bad habit into.


Comments