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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -